I am seeing some weird behaviour where after I clear the cache by requesting the module page on the admin interface the profile will display on the account info page but on the second and subsequent loads it will not display. I have had a look at this with devel themer and it appears as if the template is getting called (I have my own themed template) but that both the $node and $tabs variables are not set.

Comments

fago’s picture

Status: Active » Postponed (maintainer needs more info)

hm, is it displayed afterwards again? Is the node still there?

yellek’s picture

Status: Postponed (maintainer needs more info) » Active

The node is still there, I can see it in another view but the link never appears again. I can see static text put into the template but as I said the $node and $tabs variables have no data.

yellek’s picture

Any ideas on this? It is still occurring and I need to get it resolved before my site goes live.

flevour’s picture

Title: Profile disappears from account info after 1 view » Template override broken (was: Profile disappears from account info after 1 view)

Fago,
I can confirm this bug. The way I can reproduce this is with following steps (performed in a not vanilla environment):
* have a content profile show up on the user profile page as a complete node
* refresh any time you want and get what you expect, the profile is there
* copy content_profile-display-view.tpl.php to your active theme folder
* IMPORTANT: go to user profile page
* clear cache
* see the output as before
* refresh: the content profile disappears.

fago’s picture

I've marked http://drupal.org/node/309116 as a duplicate of this.

fago’s picture

I've opened this drupal issue for this bug: http://drupal.org/node/314819

fago’s picture

Status: Active » Fixed

For now I've implemented an workaround, which manually includes the file when needed.

yellek’s picture

What version of the plugin is this fix released in?

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

courtney’s picture

Status: Closed (fixed) » Active

I'm re-opening this since I can recreate exactly as described in comment #4 .

Using 6.x-1.0-beta3.

* have a content profile show up on the user profile page as a complete node
* refresh any time you want and get what you expect, the profile is there
* copy content_profile-display-view.tpl.php to your active theme folder
* IMPORTANT: go to user profile page
* clear cache
* see the output as before
* browser refresh: the content profile disappears.

If I then remove the content_profile-display-view.tpl.php from my theme folder and clear the cache, then the content profile shows up again and stays after browser refresh.

asak’s picture

I think i'm having this same issue going on... but not sure... it's tricky!

(subscribing...)

andypost’s picture

if someone good with core please review #314819: file includes for theming hooks fail with theme overrides.

It seems to me fix this can help reduce .module size by moving preprocess functions to includes

fago’s picture

Status: Active » Closed (fixed)

Closing old issue, please reopen if the problem persists.

andypost’s picture

Status: Closed (fixed) » Postponed

Let's postpone this until #314819: file includes for theming hooks fail with theme overrides.

This is a wellknown bug with php-templates in d6 now it's fixed in d7

If anyone review and rtbc patch for d6 we can close this issue.

davej’s picture

I was getting:
PHP Fatal error: Call to undefined function content_profile_get_add_path() in ...template.php
in theme override function phptemplate_content_profile_display_add_link (which is a copy of theme_content_profile_display_add_link with only text changes) - but only when viewing another user's account as admin. Version: 6.x-1.x-dev 2009-Sep-16 with patch from http://drupal.org/node/334292#comment-2090078 .

Fixed by replicating the existing workaround (content_profile.module line 512):

      // Working around the bug described at http: //drupal.org/node/302873
      module_load_include('inc', 'content_profile', 'content_profile.theme');

at line 525, i.e. for the elseif case as well as the if case.

Dave

andypost’s picture

davej’s picture

@andypost: I applied http://drupal.org/files/issues/theme_reg_hook_discovery-D6.patch, visited & saved admin/build/themes & admin/build/modules but still got the error described at comment #15. Which admittedly is not the same problem as the original poster's here - I posted here due to the comment in the code referring to this issue.

Dave