form_state->setRedirect(to_a_new_node_page) from the submitForm function, route "does not exist" issue I created a custom module, It generate a custom Form in a page.
When I submit my form, I create a new node.
So, I am redirect to the form page but I would like be redirect to the new node page.

I add this line at the end of my submitForm function : 

$form_state-&gt;setRedirect('node/'.$mynewnode-&gt;id());


But when I submit my form from the website, I get the empty-white-screen-of-the-death. My apache log : 

...
Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "node/153" does not exist.
...


And then, when I go manually to the node/153 page, there isn't any problem. The page work well. 

My question : where is my mistake ? How can I set the redirection after create the new node ? Is it possible from the submitForm function ?
I think if you want to use the setRedirect function then you might want to look at its documentation found https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21FormState.php/function/FormState%3A%3AsetRedirect/8

You can then base the ff. code from FormSubmitter::redirectForm or FormSubmitterInterface::redirectForm. So your code might look something like:

$form_state-&gt;setRedirect('entity.node.canonical',
  array('node' =&gt; $mynewnode-&gt;id()),
));


You can also find out where is "entity.node.canonical" from by searching in core/modules/node and where it is declared and what it's about.

Hope everything's going great!