Preprocessor function from the module that registers a theme implementation should start with template_preprocessor_ rather than modulename_preprocessor_ so that they can be overridden by other modules. There are two misnamed preprocessors. Patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | preprocessors_728472-1_DRUPAL-6--2.patch | 1.5 KB | darren oh |
Comments
Comment #1
darren ohPatch for DRUPAL-6--2 branch.
Comment #2
darren ohNo need for review (although maintainers are free to disagree). This is a basic, well-documented Drupal standard. Using the theme layer (Drupal 6.x)
Comment #3
jonathan_hunt commentedThis patch is working for me, thanks.
Comment #4
Anonymous (not verified) commentedThis is a perplexing issue, because my module (buildmodes) can implement hook_preprocess_content_field() but unless I change its weight, it runs before content_preprocess_content_field(). If I'm adding template suggestions, they are overwritten by content_preprocess_content_field() which assumes it is the first preprocess to run.
Comment #5
darren ohThat is exactly why modules are supposed to start their preprocessor names with "template_". Preprocessor functions starting with "modulename_" will always run after preprocessor functions starting with "template_".
Comment #6
Monzer Emam commentedthis issue tokes from me few hours today to catch it.
As in first place anyone will think the issue in his module
please commit.
Comment #7
Anonymous (not verified) commentedThis bug continues to be a problem for other modules that want to implement a preprocessor function for content_field.tpl.php. #1004514: node var not always available in preprocess function
Comment #8
bleen commentedsubscribing
Comment #9
yched commentedCommitted to both 2.x and 3.x branches - thanks !
Comment #11
doublejosh commentedI just upgraded to 6.x-2.9 and fieldgroups managed by fieldgroup-simple-group_MYGROUP.tpl.php suddenly don't show.
Any similar experiences?