Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific preprocess functions for theme hook suggestions are not invoked #6086

Open
klonos opened this issue Apr 29, 2023 · 1 comment
Open

Comments

@klonos
Copy link
Member

klonos commented Apr 29, 2023

History:

Problem/Motivation

When you have a template suggestion available and are using that template, preprocess functions following naming conventions provided via hook_theme_suggestions_HOOK() are not being recognized, for example:

MYTHEME_preprocess_node__article()
MYTHEME_preprocess_block__search_form_block()
MYMODULE_preprocess_page__front()
MYMODULE_item_list__search_results()
etc.

Proposed resolution

Add a post-process step to the theme registry build to look for these types of preprocess functions and add them to the theme registry.

@klonos
Copy link
Member Author

klonos commented Apr 29, 2023

Other than the silliness of the D7 EoL reason, I'm opening this issue as a placeholder, to see whether the rest of the concerns around potential changes in contrib space are valid and to what extend, and whether we can possibly fix this in a non-disruptive way in Backdrop (and if not, then move it to 2.x). Specifically this remark:

Identify and discuss possible side effects.

There would likely be many. We couldn't even begin to think up how many or what kind, mainly due to the fact that this would be affecting hundreds of thousands of existing sites. Who knows what people have done to overcome this bug. ... Contrib has been "fixing" this for years, implementing this now would likely be majorly disruptive to existing sites as it would also likely require whatever contrib module that implemented said "fix" to reverse it and make a release. Thus inadvertently tying a core release with multiple contrib releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant