I'm having a bizarre problem.

I'm currently developing a website using Drupal 6.0. I've developed the theme and all was good. However, now, whenever I update content on the site - whether via the Drupal admin or directly on the database, the theme breaks.

The first thing to happen is I get an PHP Fatal error:

Fatal error: Call to undefined function menevit_get_mainnav() in /var/www/vhosts/menevit.com/httpdocs/sites/all/themes/menevit/page-front.tpl.php on line 13

This suggests that template.php is not being loaded as the function menevit_get_mainnav() is defined there.

What I do then is revert to the default theme (Garland) and the problem dissapears. This suggests that the issue is indeed with my theme. But where?

Now, I go back and reactivate my theme to see if the problem will just go away :) What happens now is that the stylesheet from my theme is being used, but not my template files.

This persists even if I disable all other themes (so my theme is the only one that is both enabled and default) and set my theme as the administrative theme.

The ONLY remedy to this problem (not a solution) is to restore the database from backup. When I do this, everything is back to normal - that is - until I update some content, at which point the issue starts all over again.

Has anyone experienced anything like this?

Does anyone have a solution? The process of elimination isn't revealing much :(

Cheers,
Robert

Comments

dvessel’s picture

That should not be possible. Double check the function name inside page-front.tpl.php. template.php will always be loaded first. If that doesn't help, check for any modules that may be doing something odd.

joon park