It's not possible to customize the $submitted variable in Zen subthemes, because the MYTHEME_preprocess_node function is called *before* zen_preprocess_node, so any changes to $submitted made by the sub-theme template are overriden by zen_preprocess_node. This would affect also to _preprocess_page and _preprocess_comment.
The solution would be either altering the call order of _preprocess_node hooks (right now I don't know if that can be done), or detecting whether $submitted has been altered by the subtheme template (which looks difficult).
Related issues:
http://drupal.org/node/987916
http://drupal.org/node/364470
Comments
Comment #1
star-szrI can't reproduce this - can you please post your MYTHEME_preprocess_node() code if you're still having this issue?
Comment #2
John Franklin CreditAttribution: John Franklin commentedI'm seeing the same thing, using Zen 7.x-5.1. My THEME_preprocess_node() is about as simple as it gets:
dpm()
calls (not shown) in this function and inzen_preprocess_node()
confirm the calling order.Comment #3
John Franklin CreditAttribution: John Franklin commentedNevermind. I'm an idiot. This site has a site-specific theme and a site specific module, both named the same thing. The version of _preprocess_node named for the module is winning out over the theme. Renaming one or the other fixes it.
Comment #4
echoz CreditAttribution: echoz commentedComment #6
albertczyk CreditAttribution: albertczyk commentedI had forgot about this issue until it reappeared again... Now I'm back with an example:
mysubtheme/template.php:
zen/template.php:
If I comment out the line that sets $variables['submitted'] in zen_preprocess_node(), my $submitted shows up. If I don't, then my $submitted is overriden.
The clean solution would be to guarantee that zen_preprocess_node is executed before all preprocess_node hooks in the active subtheme. If there is no way to achieve this, then probably it would be wise to check if the variables are already set before overwriting them.
Comment #7
albertczyk CreditAttribution: albertczyk commentedFor what I'm seeing, there is no easy solution, as the theme has no control over the hook calling sequence, so there is no way to block the subtheme's hooks from being called before the main zen hooks - unless your hook function is alphabetically after zen_preprocess_node
Comment #8
JohnAlbinI'm not sure a fix is possible.
Comment #9
JohnAlbinBut you can make the change in a THEME_process_HOOK() function.