- Issue created by @Miguel Andrade
- First commit to issue fork.
- 🇮🇳India sagartiwari
I've created a merge request to address the issue reported regarding custom page redirects for 403 errors. As noted, when using a custom redirect like /user/login/ for 403 pages, the theme override still displays the default 403 page. Additionally, the "Go back" link does not correctly handle {{ base_url }}.
I've resolved this by adding the necessary logic in a preprocess function and updating the page--403.html.twig template accordingly. With these changes, the redirect works as expected, and the link respects the correct base URL.
Please review the MR when you get a chance. Feedback is welcome!
Thanks!
- Status changed to Needs work
16 days ago 7:54am 12 June 2025 Hello,
I followed the steps below to review the issue:- Installed the theme version 1.4.3 in Drupal version 10.4.8.
- Checked the page
/user/1
in anonymous view. Found the 403 default page. - In Basic site settings, I configured the 403 page to redirect to
/node
. Revisited the page in step 2. Noticed the page is still showing the 403 default page. - Applied MR!13 cleanly.
- Repeat step 3; it appears the redirection is corrected, the actual
/node
page is visible instead of the default 403 page. Checked by adding different redirection paths and also without. All worked correctly.
After applying the patch, the Back to Home button is redirecting to the same page. I think the Back to Home should redirect to the home ( Default front page ) of the site; redirecting to the same page with the button text "Back to Home" is not logical. IMO, using
/
instead of{{ base_url }}
would be proper.
Attaching SS for reference. Moving to NW.
Thanks