Rendering does not use correct nondefault theme for anonymous

Created on 19 January 2018, over 6 years ago
Updated 25 January 2023, over 1 year ago

Currently the theme and theme token are not sent as part of the request, due to the removal of ajax_page_state. However, due to the checks carried out in menu_get_custom_theme() we require these variables for the correct theme to be used for rendering.

I saw this problem manifest when using an administrative AJAX view. The HTML returned was being rendered using a template from the front-end theme rather than the admin theme, because theme detection couldn't be performed from the request.

The fix here is to at least pass the theme and theme_token along with the request, and alter the theme detection to allow GET to be used instead of POST (see ajax_base_page_theme()). This will make the caching less effective given multiple sessions and distinct theme tokens, but will make the behaviour correct (which I would argue beats better caching!).

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom ben.kyriakou

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.

Production build 0.69.0 2024