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

xjm’s picture

Priority: Normal » Major
Issue tags: +beta target
dawehner’s picture

Just 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.

dawehner’s picture

Status: Active » Closed (duplicate)