[wp-hackers] Changes to widget data in 2.3?

Jairus Pryor jairus at gmail.com
Fri Dec 14 17:14:41 GMT 2007


I must've accidentally cut off part of the email before I sent it.

The missing paragraph:

"I've developed a plugin (dev name 'widgeties') that allows for widget
layout and configuration to be saved on a per-page and a per-post
basis. Most of the dev has taken place under 2.1 and 2.2, but I'm
hoping to polish it up and release it sometime in the near future."

You're probably right, Otto, for some reason the plugin isn't
reading/writing in the same format under 2.3 that it is in 2.2. Given
that it works fine after being saved I wouldn't really care, honestly,
except that I have an install of 2.2 with about 3000 pages/posts, many
of them having customized widget layouts and configs. I'll find a way
to automate the upgrade.

Jairus

On 12/14/07, Otto <otto at ottodestruct.com> wrote:
What do you mean "only on pages"? Widgets do not support per-page
> configuration currently.
>
> Are you using some kind of plugin to allow this? I searched and could
> not find "widgeties" anywhere in the normal source code.
>
> As for the s:117, that's WordPress's way of specifying a string.
>
> Example:
> a:1:{i:0;s:4:"pb-3";}
>
> That's specifying an array with 1 item in it. When it's parsed back
> into a PHP array, it'll have arrayname[0]="pb-3". The i:0 is an
> integer. The s:4:"pb-3" is a string. The four means 4 characters in
> it.
>
> So, what you posted shows a 117 character long string. It just happens
> to contain something that itself is a serialized array. I suspect that
> the plugin you're using works differently under 2.3 than it did
> before.
>
>
> On 12/14/07, Jairus Pryor <jairus at gmail.com> wrote:
> > I'm testing an upgrade to 2.3, and I noticed that widgets were having
> > problems, but only on pages on which I hadn't made any changes to the
> > widgets since upgrading. If I saved a page as-is, the widgets would
> > start rendering problem-free.
> >
> > So I saved a page (having made no changes), and looked at the DB
> > before and after:
> >
> > Before
> > (4082, 2935, '_widgeties',
> > 'a:3:{s:9:"sidebar-1";a:1:{i:0;s:4:"pb-3";}s:9:"sidebar-2";a:1:{i:0;s:4:"pb-1";}s:9:"sidebar-3";a:1:{i:0;s:4:"pb-2";}}'),
> >
> > After
> > (4082, 2935, '_widgeties',
> > 's:117:"a:3:{s:9:"sidebar-1";a:1:{i:0;s:4:"pb-3";}s:9:"sidebar-2";a:1:{i:0;s:4:"pb-1";}s:9:"sidebar-3";a:1:{i:0;s:4:"pb-2";}}";'),
> >
> > ...so the change that I can see is that it's now part of the data is
> > encapsulated, like so:
> >
> > s:117:"DATAHERE";
> >
> > Does anyone know what the "s:117" is referring to, and what the change
> > was made in regards to?
> >
> > Jairus
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list