I'm having problems using theme developer with an adaptivetheme subtheme. Hope someone has a suggestion. I'm trying to test a preprocess function (mytheme_preprocess_node) to insert a variable. If I do not copy the original node.tpl.php from the base theme to my subtheme, theme developer works fine and shows my inserted variable with all other node variables. But, if I copy the node.tpl.php from the base folder to my subtheme "templates" folder, theme developer fails to recognize any of the variables. It also doesn't show a list of "Preprocess functions" like usual.

For example, if I use a preprocess function in my subtheme *without* copying over the related .tpl.php file, this is what "themer info" gives me (notice the "sample_variable"):


Template called:
    node.tpl.php
File used:
    sites/all/themes/adaptivetheme/templates/node.tpl.php
Candidate template files:
    node-story.tpl.php < node.tpl.php
Preprocess functions:
    template_preprocess + template_preprocess_node + adaptivetheme_preprocess + at_koda_preprocess_node + content_profile_template_preprocess
Duration: 5.03 ms

Template Variables

(Array, 52 elements)
nid (String, 2 characters ) 26
...
sample_variable (String, 12 characters ) Lorem ipsum.
content_profile (Object) content_profile_theme_variables 

But, when I copy the original .tpl.php file from the base theme to my subtheme and clear cache, most of the above information is no longer available including the "file used", "preprocess functions", and "variables".

Template called:
    node.tpl.php
Candidate template files:
    node-story.tpl.php < node.tpl.php
Duration: 7.21 ms

I thought this might be an issue with my particular subtheme, but testing with AT_Koda appears to produce the same issue.

Any ideas why this might be happening or suggestions for how I can view all of these variables?

Comments

Jeff Burnz’s picture

I'm not entirely sure why you get such limited information - have you cleared the theme registry? You should get more info than that by default, although I have found that I need to un-comment the sub-themes preprocess functions to get the function suggestions to show up in Themer.

apothus’s picture

Thanks for the response Jeff.

I narrowed it down to the content_profile module.

I can reproduce the above by doing a clean drupal install with AT dev and AT Koda and enabling only 4 modules - devel, theme developer, menu, and content profile. Disable content profile and the theme developer works fine. Enable it, all information disappears. It's the same on the existing site that I'm working on. Again, this is only when I copy the original .tpl.php over to the subtheme and try to use a corresponding preprocess function in my themes template.php.

Let me know if you have any suggestions or if I should take this issue elsewhere. I appreciate your time.

FYI...this is from the module's readme. Not sure if it's important or relevant.

Theming: Easily use profile information in your templates! 
-----------------------------------------------------------
Content Profile adds a new variable $content_profile to most templates related to users.
So this variable allows easy access to the data contained in the users' profiles.
Furthermore it does its job fast by lazy-loading and caching the needed content profile
nodes.

The $content_profile variable is available in the page, node, comment, user_name,
user_profile, user_signature, search_result and some other templates. 

apothus’s picture

I *think* I solved the problem by applying this patch to content_profile: http://drupal.org/node/667910

Jeff Burnz’s picture

Status: Active » Closed (fixed)