How to use a RedirectResponse with a # (hash)?
Try url encoding the # fragment. so it becomes %23, e.g:

$event-&gt;setResponse(new RedirectResponse(base_path().'mypage%23actions_clicker'));


Update:

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