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.

Comments

darren oh’s picture

Status: Active » Needs review
StatusFileSize
new1.5 KB

Patch for DRUPAL-6--2 branch.

darren oh’s picture

Status: Needs review » Reviewed & tested by the community

No need for review (although maintainers are free to disagree). This is a basic, well-documented Drupal standard. Using the theme layer (Drupal 6.x)

jonathan_hunt’s picture

This patch is working for me, thanks.

Anonymous’s picture

This 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.

darren oh’s picture

That 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_".

Monzer Emam’s picture

Priority: Normal » Major

this issue tokes from me few hours today to catch it.

As in first place anyone will think the issue in his module

please commit.

Anonymous’s picture

This 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

bleen’s picture

subscribing

yched’s picture

Status: Reviewed & tested by the community » Fixed

Committed to both 2.x and 3.x branches - thanks !

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

doublejosh’s picture

I just upgraded to 6.x-2.9 and fieldgroups managed by fieldgroup-simple-group_MYGROUP.tpl.php suddenly don't show.

Any similar experiences?