Redirect after updating nodes I've to redirect users, after updating a node, to /node/NID path and not to /node/NID/latest (I'm using content moderation).

I've tried to add this on hook_node_update() but have been ignored (without warning or errors):

if (!$entity-&gt;isNew()) {
    $path = URL::fromUserInput('/node/' . $entity-&gt;id())-&gt;toString();
    return new RedirectResponse($path);
}
use \Drupal\Core\Url;    
use Symfony\Component\HttpFoundation\RedirectResponse;

function MYMODULE_node_update(Drupal\node\NodeInterface $node) {
  $path = Url::fromUserInput('/node/'.$node-&gt;id())-&gt;toString();
  $response = new RedirectResponse($path);
  $response-&gt;send();
}


You have to use like above. You are just returning the redirect response. You need to send redirectresponse to given path.