Welcome! To use this support forum, please Login or Join Today!

   

Theme not initialized

{name}
Rank

Total Posts: 1

Joined 2011-05-09

PM

 

A site I did for a client crashed and is showing the message:

Theme Not Initialized
Please save the theme options first.
WP Admin -> Appearance -> Breeze Options

Any ideas why this happend?  Can I upload a copy from a few months ago or is it easier to re-initialize?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

The theme settings are stored in the wp_options table of the database, so unless something was changed internally or on the server side, this shouldn’t happen.
Was the site recently migrated to a new server? Was anything changed in the database tables?

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 

I have the same error upon previewing and attempting to activate the theme for the first time. “waiting for jigsaw.w3.org” showed in the status bar and didn’t go away until the theme errorer out, and I’m getting the same “waiting” behavior now that I’ve manually activated the theme and saved the options. Not sure of the connection there, but that’s what I observed.

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

jigsaw.w3.org is the XHTML validation service. This is not something that is part of the theme. Do you have any plugins/addons that may be preventing things from loading properly?

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 
Casey - 14 September 2011 03:56 PM

jigsaw.w3.org is the XHTML validation service. This is not something that is part of the theme. Do you have any plugins/addons that may be preventing things from loading properly?

I have a bunch of plugins, but they have all been providing required functionality and not caused any problems with any themes until now. I tested other themes and found the preview was hung for all of them until the W3 validation check had timed out, but then they would preview correctly. I found that the Display Queries plugin was doing that check and disabled it and the hang time problem is gone.

However, I tested the Breeze theme on another site without that plugin and it went Kaboom there as well upon preview. Here’s the message:

Theme Not Initialized
Please save the theme options first.
WP Admin -> Appearance -> Breeze Options

When you activate the Breeze theme, you see the same message on viewing the site. If you go to Breeze Options and click the Save button, the site displays properly and doesn’t seem to have any more issues. You can activate another theme, then try previewing Breeze and it will display fine.

Hope this helps a bit.

 

 

 

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Yes, the theme initialization is required.
The theme has no default settings until saved.

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 
Casey - 14 September 2011 04:32 PM

Yes, the theme initialization is required.
The theme has no default settings until saved.

Question, how can you get to the theme options unless you activate the theme? Which is difficult to justify doing if it blows up on preview, don’t you think?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

The activation message only appears temporarily on the front end. Assuming you installed the theme, you have access to the WordPress back end:
(WP Admin -> Appearance -> Breeze Options).

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 
Casey - 14 September 2011 04:38 PM

The activation message only appears temporarily on the front end. Assuming you installed the theme, you have access to the WordPress back end:
(WP Admin -> Appearance -> Breeze Options).

Ok so you’re saying when previewing and activating Breeze, it will always show this error until you visit the Breeze Options page and click Save, even if you don’t change anything in the options.

I’m going to have to suggest you look into finding a way that it won’t do that. Having your theme not be able to be previewed and activated in the normal WP way is pretty surprising for such an advanced theming system, and it just caused both of us to lose some time today hashing it out.

Edit after later posts - sorry, I should have specified “preview before activation and on first activation”. Sorry for the confusion!

 

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

even if you don’t change anything in the options

Ok, let me back up here. So you’re saying this message randomly displays on your site? After the options have been saved? This message should only appear the first time you install the theme.

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

I’ll try to avoid any confusion in the future. You are correct in that this shouldn’t be a necessary step.

Removing this bit from header_functions.php should prevent the message from ever displaying again:

function st_settings_saved() {
 $messageunsaved = 'Theme Not Initialized <br /><span class="smallmsg">Please save the theme options first.</span><br /><span class="smallermsg">WP Admin -> Appearance -> Breeze Options</span>';
 if (get_option('sthemes_def_layout') != "") {} else {echo "<div id=\"unsaved\">$messageunsaved</div>";}
}

add_action('wp_head', 'st_settings_saved');

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 
Casey - 14 September 2011 05:02 PM

even if you don’t change anything in the options

Ok, let me back up here. So you’re saying this message randomly displays on your site? After the options have been saved? This message should only appear the first time you install the theme.

No, that’s correct. What I’m saying is that normally a theme does not show a car-crash error message when previewed before activation or activated for the first time on a site. I understand that you’ve got it coded so that it needs the options saved before it will work.
I’m suggesting you look into a way that it won’t do that, because it’s not normal behavior for WP themes, and it just caused me and you to do all of this back-and-forth. I would suggest just doing a check for the options and loading a set of defaults if they’re not found in the db, so that the theme previews and activates normally. Then throw an admin dashboard message to go to the options screen, and you should be all set.

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 
Casey - 14 September 2011 05:14 PM

I’ll try to avoid any confusion in the future. You are correct in that this shouldn’t be a necessary step.

Removing this bit from header_functions.php should prevent the message from ever displaying again:

function st_settings_saved() {
 $messageunsaved = 'Theme Not Initialized <br /><span class="smallmsg">Please save the theme options first.</span><br /><span class="smallermsg">WP Admin -> Appearance -> Breeze Options</span>';
 if (get_option('sthemes_def_layout') != "") {} else {echo "<div id=\"unsaved\">$messageunsaved</div>";}
}

add_action('wp_head', 'st_settings_saved');

We cross posted, so I’m acknowledging here. Thanks for the fixup!

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

No problem. Sorry for the confusion.
I’m aware of little things like this becoming bigger issues, so I’ll commit this to the repo.

Somewhat related, I think you’ll be pleased to know that our framework will be getting a big update in the next week or so. Breeze will be transferable into a child theme that can be updated automatically and will offer many more options:
http://www.simplethemes.com/help/smpl_framework/

{name}
Rank

Total Posts: 21

Joined 2011-09-14

PM

 

Very nice, child themeing would be great for my intended use. I’ll keep an eye out. Ciao!