ExceptionController's on403Html() and on404Html() use _system_path for several purposes:
- To set the 'destination' query parameter value, but that can be replaced with drupal_get_destination().
- To log what page the request was for, but that can be replaced with $request->getPathInfo().
- To compare is the current request is already for the page.403/page.404 values, but that can probably be replaced with something else (need to figure out what).
Do the above.
Comments
Comment #1
xjmComment #2
dawehnerJust checked, sadly #2323759: Modularize kernel exception handling did not allowed to get rid of it. In general drupal_get_destination() also just feels like a workaround tbh.
Comment #3
dawehnerSeems to be a duplicate of #2302065: Be able to pull of the current path from the request/route match though.