Hi,

as instructed in 307309, I'm opening a new issue.

My customized Zen-based sub-theme, based on 6.x-2.x-dev, says on almost every page:

For easier theme development, the theme registry is being rebuilt on every page request. It is extremely important to turn off this feature on production websites.

However, I can't find a place to disable rebuilding the theme registry. In the message above, "turn off this feature" is linked to ./admin/build/themes/settings/toxim; there I have no option to relating to the theme registry (there I have three fieldsets: "Toggle display", "Logo image settings", and "Shortcut icon settings"),

In my theme's info file I've set settings[zen_rebuild_registry] = 0; however, I can also set this to "1", I'm still getting the message above. Also, I double checked that theme-settings.php does not contain any references to STARTERKIT.

Is there any (other) way to disable rebuilding the theme registry, or what is happening here?

Thanks & greetings, -asb

Comments

vm’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Component: PHP Code » Documentation
Category: bug » support

go to administer -> themes
click on configure for the ZEN theme (not your subtheme)

disable theme registry

vm’s picture

Status: Active » Fixed
asb’s picture

Status: Fixed » Active

> go to administer -> themes
> click on configure for the ZEN theme (not your subtheme)
> disable theme registry

The "Zen" theme is disabled on this site since I'm not using it. Does it have to be enabled even if using a sub-theme? That would be quite different to zen 6.x-1.0...

However, when enabling and going to ./admin/build/themes/settings/zen, "Rebuild theme registry on every page" is unchecked. If I check it and save, then uncheck it and save again, I'm still getting the nessage "For easier theme development, the theme registry is being rebuilt on every page request. It is extremely important to turn off this feature on production websites".

In my sub-theme there's no setting like "Rebuild theme registry on every page", there I have "Toggle display", "Logo image settings", and "Shortcut icon settings" (thus re-opening the issue).

Greetings, -asb

sutharsan’s picture

No, Zen theme does not have to be enabled for a sub theme to work.

To disable the Rebuild registry setting of your _sub_ theme you have to go to admin/build/themes/settings/my_sub_theme_name
If you have no Rebuild registry setting on this page, you have to follow the instructions. Copy theme-setttings.php from STARTERKIT to you subtheme directory and replace all occurences of STARTERKIT in this file with my_sub_theme_name.

asb’s picture

Hi Sutharsan,

I think I followed the instructions precisely (I've done some Zen 6.x-1.x subthemes without these problems). Just double-checked - In MY-SUB-THEME/theme-setttings.php, MY-SUB-THEME/template.php, and MY-SUB-THEME/MY-SUB-THEME.info are no referenctes to STARTERKIT.

Any other ideas?

Garrett Albright’s picture

If you followed the directions precisely (or as precisely as could be expected given that the instructions haven't been updated for the 2.0 branch yet), there won't be any references to STARTERKIT, because you replaced them with the name of your module.

In the .info file, do you see a line which looks like this?

settings[zen_rebuild_registry]     = 1

Try setting it to zero, then flushing your site's cache.

asb’s picture

> In the .info file, do you see a line which looks like this?
> settings[zen_rebuild_registry] = 1
> Try setting it to zero, then flushing your site's cache.

I tried that already, without success (please cf. with initial issue above).

Greetings, -asb

authentictech’s picture

@asb: What Sutharsan was referring to was when you first downloaded Zen there was a folder called STARTER_KIT -- inside this folder you will find a file called theme-settings.php which you need to copy into your subtheme folder. This file will enable your subtheme to have the same settings as the Zen theme to which people are referring you to.

Having said that, it seems ike you already have copied the theme-settings.php file into your subfolder and, if so, all I can suggest is that you copy it again from the STARTER_KIT folder and see if that fixes it (note any custom changes you made to theme-settings.php so you can re-add them after confirming the required settings are being displayed for your subtheme).

I recall having similar problems to this when I tried Zen a while ago, and I couldn't stop the message from appearing even after disabling the option to rebuild the theme registry. I didn't use it enough to warrant taking more time to solve it but I hope you can find a solution.

Regards.

jpdaley’s picture

I have this problem as well, and stumbled on a solution quite by accident.

Go to your list of themes and enable "Zen Themer's Starter Kit" them (Not the normal Zen them).
Go to the configuration tab, and then select "Zen Themer's Starter Kit" to configure.
Scroll down and uncheck the "Rebuild theme registry on every page" checkbox.
Click Save Configuration.

NOW go to your subtheme configuration tab.
Click Save Configuration (even though you didn't change anything here).

Theme Registry rebuilds should now be turned off.
Let me know if this helps.

RockSoup’s picture

This worked for me! thanks jpdaley

vm’s picture

Status: Active » Fixed
asb’s picture

Status: Fixed » Active

@jpdaley (#9): Sorry, that's exactly what is not not working for me. Setting the issue back to "active".

vm’s picture

2.x-dev was updated on 9/7 are you using the latest -dev?

asb’s picture

Jupp, I'm updating daily through Drush. Last installed version:

# drush info zen
Project Release         Date
------- -------         ----
zen     6.x-2.x-dev     2009-Sep-07

Greetings, -asb

kdebaas’s picture

Have the STARTERKIT references all been replaced by the properly spelled name of your subtheme? Do you have the same problem when you spawn a fresh subtheme from scratch? Care to post the contents of your subtheme's template.php and theme-settings.php here, so we can take a look with you?
Cheers

vegemite4me’s picture

@jpdaley (#9): Worked perfectly for me. Thank you.

justin.hopkins’s picture

I see this didn't work for @asd, but since this thread is most relevant when searching the error message, I wanted to put down that the above did work for me.

*I am using the 'camp' subtheme* from http://drupal.org/node/519100. 'settings[zen_rebuild_registry] = 1' does appear in camp.info

Cheers!
Justin

mbeenon’s picture

To make things more clear.. and since I've had the same problem, let me properly explain this method of turning this feature off.

You must go to your themes list and 'Enable' Zen theme.
Then 'configure' Zen theme. Check to see if the feature is enabled or not, and if it is, 'uncheck' it.
Then 'save' the settings.
Then go to configure your sites theme, and save the settings, without making any actual changes.

You must leave the Zen theme enabled. The setting will now remain off.

tomgf’s picture

Having the Zen theme enabled (even if you are not using it) is the best approach to solve this issue?

mbeenon’s picture

This is not the best solution at all. And forgive me, it also doesn't turn off the theme re-build permanently.

tomgf’s picture

And then what it would be the proper way to stop this and not having this permanent re-build…?

(I agree: on my system, having the Zen theme enabled and unchecking the “Rebuild theme registry on every page.” option didn't change a thing and I am still having this alert messages…)

tomgf’s picture

I found where my problem was: on theme-settings.php the function mytheme_settings() had the wrong name. Therefore, it was never called and that's why I haven't got the Theme registry checkbox in admin/themes/settings/mytheme.

Maybe this is useful to someone else: check that your theme-settings.php is having the proper functions (with the correct names) and that they are called!

RdN’s picture

I was also having this problem and @tomgf #22 solution fixed it. Thank you.

crutch’s picture

I've built about 10 zen themes the past year with no issues. Ran into this same problem just on my latest one (or first one this year).

Problem: User (my) error
Solution: #22 - Thanks for the above documentation

patrickharris’s picture

Thanks tomgf - #22 fixed it (tries not to feel embarrassed).

mybinaryromance’s picture

same problem here.

my sub-theme does not save ANY theme-specific settings and neither does the zen theme. i tried both variations, with zen enabled and disabled. i tried all solutions proposed here with no success.

furthermore, any custom tpl.php files (page.tpl.php etc) i put into my subtheme folder are not loaded. it keeps using the zen/page.tpl.php even if zen is turned off.

somewhere on the web i found a suggestion that this issue might have to do with Suhosin Patch 0.9.7 running on the server.

any ideas about this?

Garrett Albright’s picture

For what it's worth, I have the Suhosin patch on the servers I manage, and have never had this problem on them.

j0e’s picture

thanks Tomas (#22)
appreciate it, i renamed one of my themes, and forgot to find/replace the themename in theme-settings.php.
much appreciated,
Joseph

akalata’s picture

Status: Active » Fixed
jawbreak’s picture

Thanks jpdaley (#9) worked for me.

I had to also click save on the Zen theme itself as well.
I made sure "Rebuild theme registry on every page" checkbox was unchecked and clicked save. Even if it was already unchecked I had to click save.
I did this for all three themes: Zen StarterKit, Zen, and my sub-Zen theme.

Status: Fixed » Closed (fixed)

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

hermes_costell’s picture

Just so others are aware of this issue - I had a subtheme of Zen-960 so it was a subtheme of a subtheme. I had to go up the inheritance tree (Zen > Zen-960 > my subtheme), enable all of them (they weren't "enabled"), configure all of them, save.

glass.dimly’s picture

Yeah, or you can just go into the database, in phpmyadmin search for %registry%

find the setting for your theme, which holds a serialized array that looks like this:

"zen_rebuild_registry";s:1:"1";

change to this

"zen_rebuild_registry";s:1:"0";

j0rd’s picture

I had this problem in a clients site. In theme-settings.php I had to replace all occurances of STARTERKIT with his proper theme name.

This resolved the problem for me.

vm’s picture

@ #34 which means whomever built the zen subtheme didn't follow step four of the directions for creating a subtheme as theme-settings.php is mentioned as needed STARTERKIT changed.

"4.Edit the template.php and theme-settings.php files in your sub-theme's folder; replace ALL occurrences of "STARTERKIT" with the name of your sub-theme.
For example, edit foo/template.php and foo/theme-settings.php and replace every occurrence of "STARTERKIT" with "foo"."

referenced from: http://drupal.org/node/629510

Anyone else having this issue may want to check their files to ensure no left over STATERKIT_ naming left in either file.

Alex Andrascu’s picture

Status: Closed (fixed) » Active

sorry but this isn't fixed...i've done everything mentioned on this page still getting this error.
Please advise

vm’s picture

please pastebin.com and link here your theme-settings.php file

Alex Andrascu’s picture

Apparently this is related to #1091488: Theme registry fails to clear at least for me.

vm’s picture

Status: Active » Closed (fixed)
RichardLynch’s picture

I found out the hard way just what that message means over the last couple weeks...

MASTER hard drives filling up at the rate of 1.1G per day on a low-traffic site.

http://richardlynch.blogspot.com/2012/02/rebuild-theme-registry-on-every-page.html

bushman’s picture

THIS WORKS! Thanks

Pascal.s’s picture

Here's my solution after i tried everything in this page.
I made a backup of the database that i uploaded on my local desktop. Then i was able to turn of the rebuild theme registry. made a new backup of database, ulpoad it on the site's server and BOOM! It works!
For this, I use backup and migrate module because it's reliable and fast.
Maybe it won't work for everyone but at least, it won't take long to find out!
I use MAMP on my localhost
Good luck!

13rac1’s picture

Addendum to #33
The SQL statements required to locate themes with potential zen_rebuild_registry values in your database are:

select * from system where filename like "sites/all/themes%";
select * from variable where name like "theme%";

Plus, the following if you are using Domain Access:

select * from domain_theme;
theoracleprodigy’s picture

Ah this finally may have resolved my issue. I had to go to structure / domain then click on edit domain for each domain. Then go to theme / configure and uncheck the rebuild theme registry there.

I got this idea from the above:
Plus, the following if you are using Domain Access:
select * from domain_theme;

Also if you are doing this directly in the database be careful my values ended up being "zen_rebuild_registry";i:0;

dsteplight’s picture

Go into Appearance and make sure you theme is enabled first. Once it's enabled you should them be able too turn off the setting.