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

Andrew Ferguson andrew at fergcorp.com
Fri Dec 14 16:21:08 GMT 2007


"As for the s:117, that's WordPress's way of specifying a string."

It's actually the PHP serialize function's way, not just WP. (
http://www.php.net/serialize)

On Dec 14, 2007 9:05 AM, 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