I've found that after creating some custom nodetype template files, that I need to call the block function from the custom node.tpl.php file (node-trail_review.tpl.php). Unfortunately, it looks like the preprocess_node function isn't actually loading when I view the node. I can verify this with the "DEBUG" line, which doens't output anything to the test file...

Here is the template.php file:

function phptemplate_preprocess_node(&$vars) {
        $vars['nodephoto_block'] = theme('blocks', 'nodephoto_block');
        $vars['google1_block'] = theme('blocks', 'google1_block');
        $vars['test'] = 'TESTSTRING';
        // file_put_contents('/tmp/vars.txt',$vars); // DEBUG
}

My node-trail_review.php has echo statements for $nodephoto_block and $test, but neither show up...

Am I missing something here?

Comments

MMoose’s picture

I think this is resolved. It was related to my issue with this support request I submitted about content-type specific node.tpl.php files not loading due to node.tpl.pohp existing...

http://drupal.org/node/314543

ztyx’s picture

Status: Active » Postponed (maintainer needs more info)

Resolved?

dvessel’s picture

Status: Postponed (maintainer needs more info) » Postponed

It's not resolved. It's simply a limitation of how templates are discovered. That part can be fixed but exposes another limitation of how theming paths are resolved. Preprocess functions and templates are inherently linked. Separate the two then the paths become all screwy.

http://drupal.org/node/279573#comment-991171

Until we figure out a definitive fix for how paths are resolved, I don't think this should be fixed.

nsyll’s picture

Have you Empty the cache first ?
You should to cache the new $vars

xalexas’s picture

I had this problem also. You need to clear cache first. Go to Administer › Site configuration > Performance > clear cache.

webcomm’s picture

xalexas is right... but why is it necessary to clear the cache even when caching is disabled? (I'm using Drupal 6.20)

damien tournoud’s picture

Category: bug » support
Status: Postponed » Closed (fixed)