User login

Zen theme in wrong location on live server breaks sites using zen subthemes when database restored on test and dev

Production working fine, copy database back for test and dev, and the environment breaks, fatally:

Fatal error: Call to undefined function zen_theme() in
/var/www/example/drupal/sites/default/themes/example/template.php on line 85

And there is something different about the Zen being seen by the two sites, but the code seems identical, and agariclabs is a restore of the stage database.

http://example.agariclabs.com:81/admin/build/themes
Zen
Zen sub-themes are the ultimate starting themes for Drupal 6. Read the online docs or the included README.txt on how to create a sub-theme.
6.x-1.1

http://stage.example.com/admin/build/themes
Zen
The ultimate starting theme for Drupal 6.
6.x-1.0

Yeah this is weird as hell - i got it on my local environment first--
somehow the path to the zen theme is being saved differently on the
production environment, so when we bring the live database back over it does
this.

Clearing caches didn't fix it.
SQL query:
TRUNCATE cache ;
TRUNCATE cache_block ;
TRUNCATE cache_content ;
TRUNCATE cache_filter ;
TRUNCATE cache_form ;
TRUNCATE cache_menu ;
TRUNCATE cache_page ;
TRUNCATE cache_update ;
TRUNCATE cache_views ;
TRUNCATE cache_views_data ;

Enabled the Zen theme on live (which is listed as 1.0 and not 1.1, which is
also wrong and odd), committed, and updated and restored on dev, and that
didn't fix it either.

Put an if function exists statement around the call for the zen_theme
function which absolutely does exist, and it works.

/bashes head against wall

This might have worked better for clearing cache
http://drupal.org/node/42055

But the real problem?

The old theme was there on the live site, not in version control. The serverside copy of the git repository was being pushed to the /var/www folder with cp -R, and that does not remove old and removed files. So that was the location being saved in the database, and when that was brought back, it broke the site.

ONCE:
warning: implode() [function.implode]: Invalid arguments passed in /var/www/example/drupal/sites/default/themes/example/template.php on line 126.

Searched words: 
php error zen subtheme undefined zen_theme

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.