Redirect subrequest via Basic site settings do not incoorporate correct theme rendering, suggestions and overrides for target path.

Created on 17 October 2017, about 7 years ago
Updated 19 July 2023, over 1 year ago

The Motivation:

Styling pages based on their paths is common and known feature of Drupal and used by many themes.

The issue:

Using the Basic site settings under /admin/config/system/site-information on the bottom of the settings form makes it possible to define redirects to custom 403 and 404 error pages. A common use case is a redirect to the user login for permission denied scenarios, like covered by many issues or custom modules around regarding this use case.

Our tests regarding the behaviour of this redirect options revealed that the pages we redirect to, do not have their respective HTML body path class attributes added. These are commonly added for styling purposes.

To reproduce:

We tested it by making the frontpage Views view "permission denied" for anonymous user and added a 403 redirect to /user/login. The body HTML tag still had the path-frontpage class attribute added /which is maybe wanted for a redirect from frontpage [to discuss]) but no(!) user-login path class attribute added (which is awaited). So redirecting a 403 to another existing page will not add the new pages path class attribute to the body HTML tag of the page we redirect to, but it will (maybe only in case of frontpage) still keep having the path class attribute from the page before added to the HTML body tag.

The Solution:

If there is a reason for this behaviour we should point to it in this issue but should make an option available to overcome this drawback. Otherwise the redirct option becomes hardly useful with custom themes from contrib using body HTML class attributes for their custom frontpage, login page, node overview page styles, etc.

🐛 Bug report
Status

Closed: outdated

Version

11.0 🔥

Component
Theme 

Last updated about 3 hours ago

Created by

🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Since there hasn't been a follow up to #17 going to close for now

    But if still a bug please reopen updating the issue summary with what theme is being used and full list of steps.

    Thanks!

Production build 0.71.5 2024