I have this code:
It redirects to /mypage, but it doesn not include the #actions_clicker part. How do I make Drupal not loose the hash / # part?
Try url encoding the
# fragment. so it becomes
Check the browser header to see that the fragment is passed. In my local testing it was ok:
Sample code to append fragment to redirect response.
return new RedirectResponse($redirect_url . '#test', 301);
More info: https://stackoverflow.com/a/2305927/583715