Skip to content
Snippets Groups Projects
Commit 3a2ab9d5 authored by Andrew Berry's avatar Andrew Berry
Browse files

Fix sending the wrong URL for custom 404 pages.

parent 08d5e285
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -73,7 +73,9 @@ public function on404Html(FlattenException $exception, Request $request) {
if ($path && $path != $system_path) {
// @TODO: Um, how do I specify an override URL again? Totally not clear.
// Do that and sub-call the kernel rather than using meah().
$request = Request::create($path);
// @TODO: The create() method expects a slash-prefixed path, but we
// store a normal system path in the site_404 variable.
$request = Request::create('/' . $path);
$kernel = new DrupalKernel();
$response = $kernel->handle($request, HttpKernelInterface::SUB_REQUEST);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment