All theme Options get rendered as a letter "A" #289

skip405 opened this Issue Mar 25, 2014 · 5 comments


None yet
1 participant

skip405 commented Mar 25, 2014

Hi Derek

I have something very strange going on here :) After two or three months of working all the theme options miraculously changed to a single letter "a".

You can see it online (mind, it's Cyrillic):

Whenever you see "a" or a Warning ("a" is obviously not an array for foreach) - that's a theme option.

I don't have much info as to "when" or "after what". Here I go with some info that I've got.

I am using it as part of a theme, not a plugin.
It is happening only on front-end. The back-end is good:
I have just updated it to the latest version (from version 2.1 or something similar, not from version 1.x) with no change so far.
I have looked into the database, into the custom-prefix_options table and there in the option_tree I don't see any missing info (at least afaik, everything looks normal)
I have pressed Save Changes several times after upgrading.
It is happening even if the option is not set. E.g. I have a default value present in my template (in case the option is not filled in) - and the "a" is shown instead of the default value - although it is not even on back-end to be filled yet )

What I haven't tried is changing the value of a particular option and resaving it.

What's bothering me is that it had been good for at least two months after the launch... Only Wordpress probably self-updated from version 3.8 to 3.8.1, but again, I'm still doubtful.

Hope you know what it is.


skip405 commented Mar 26, 2014

I've got some more details.

When I var_dump get_option( 'option_tree' ); on another project I get an array of values, whereas on this particular project I've got a long string... This string is the one stored in the option_tree row in the database. So probably it's not a problem with your plugin, but a Wordpress glitch...

skip405 closed this Mar 26, 2014

skip405 reopened this Mar 26, 2014

skip405 commented Mar 26, 2014

I keep digging around :)

When I check the string returned from get_option( 'option_tree' ); via is_serialized function it returns false.

skip405 commented Mar 26, 2014

I tried to force the unserialization and altered your function like so: $options = @unserialize( get_option( 'option_tree' ) ); - it got better :) At least all the options came back. The only thing that's left now are meta boxes (I use your plugin here too)

skip405 commented Mar 26, 2014

After some more digging I noticed that "Contact Form 7" plugin's error messages were also changed to "A"s... so it looks like it's a Wordpress serialization problem. I'm at a loss. I tried reinstalling it anew with no effect... I guess I'll start a topic at forum too

skip405 commented Apr 16, 2014

As it probably was due to a glitch in WP, I close this issue. I managed to solve it only by reverting the project with the help of the hosting company to the version that was several months ago. I also switched the autoupdate off. So far so good.

skip405 closed this Apr 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment