WordPress deletes text_widget settings in wp_options
-
Hi,
I have a local copy of a wordpress site that I use to develop, on my mac (10.5.8), which is a mirror of a site on the internet. Periodically I dump the sql from the real site and import it locally, so that I can work with the actual content of the site. When doing this, all my text widgets dissappear.
What happens is that on first load of the local site after the import of new data, the row in wp_options that contains the serialized array for the text widgets, gets reset to a blank text widget, like this:
a:2:{i:2;a:0:{}s:12:"_multiwidget";i:1;}
I’ve tested the serialized string, and it is not corrupt, meaning that PHP is able to create an array from it. I also recreated the text widgets locally, and looked at the array that was created, and it has the same structure.
Could the issue have something to do with the keys in the array, that they somehow double already existing keys in wp’s data structure. I just don’t see how that would happen, since also in the database there were other (custom) widgets, that imported just fine, but not the standard text widget.
So, finally, what is WP looking for when validating these arrays? Where in the code can I find this? Any other ideas?
Both local and remote site run the same version of wp, 3.0.1.
Please don’t respond with that I have to copy and paste and redo all the text widgets, I know how to do this, but that is not what I’m asking. I want to have an automated way of doing this, since it is something I do very often for a number of different sites.
- The topic ‘WordPress deletes text_widget settings in wp_options’ is closed to new replies.