Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299801

Specific preprocess functions for theme hook suggestions are not invoked

$
0
0

General summary

  • This is not considered a beta blocker or critical issue for D8.
  • While patches exist in this thread for D7 (and may work for you), official fix will be to D8 first -- please do not switch issue metadata until we are ready to start the D7 backport.

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.

Remaining tasks

Patch needs review.

User interface changes

N/A

API changes

Removes the global drupal_group_functions_by_prefix() (moves it to a class to make things testable) which was added May 13, 2015: #2339447: Improve theme registry build performance by 85%

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug, there was similar functionality to this in Drupal 6, or at least in Views
Issue priorityMajor because it represents a big improvement to themer/developer experience.
DisruptionLittle to no disruption, just an addition that core and contrib can choose to use or not use.


Viewing all articles
Browse latest Browse all 299801

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>