[Plugin: Spots] Problems with nested serialized data structures
-
Hi,
currently I’ve a problem with nested serialized data structures stored as _transient_spot_xxxx in table wp_options. The problem emerges when cloning a site (e.g. live server to staging or vice versa).
The original value is:
option_name: _transient_spot_9310
option_value:
s:266:”a:2:{s:6:”output”;s:211:”<p>Sie m?chten noch mehr über die E-Plus Gruppe erfahren und ben?tigen zus?tzliche Informationen?</p>
<p>Kontaktieren Sie uns</p>
“;s:6:”status”;s:7:”publish”;}”;After cloning the modified entry is:
option_name: _transient_spot_9310
option_value:
s:279:”a:2:{s:6:”output”;s:211:”<p>Sie m?chten noch mehr über die E-Plus Gruppe erfahren und ben?tigen zus?tzliche Informationen?</p>
<p>Kontaktieren Sie uns</p>
“;s:6:”status”;s:7:”publish”;}”;The over all length of the string is modified correctly (+13 characters). But the length of the string of the second array element (length=211) is unmodified. This results in a failure when executing the unserialize() in function icit_get_spot() on line 1028 of the plugin.
I use a professional plugin for the cloning process (BackupBuddy) and have reported the problem to them. Their answer is: “The WordPress Codex states that you do not need to serialise values, if the option value needs to be serialised then it will be serialised (by WordPress function) before it is inserted into the database. … You will need to contact the plugin author to have them update the plugin to conform to the WordPress convention.”
Although I’ve suggested them to add a feature which will convert nested serialized structures as well, it might be very helpful if you could modify the plugin to avoid such nested elements.
This is a great plugin and we use it for a complex footer to allow editors to modify the footer elements without having to deal with the widgets itself.
- The topic ‘[Plugin: Spots] Problems with nested serialized data structures’ is closed to new replies.