[pmwiki-users] Error on Snippets.Lists

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 16 17:52:01 CDT 2006


On Mon, Oct 16, 2006 at 04:58:43PM -0400, The Editor wrote:
> On 10/16/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > On Mon, Oct 16, 2006 at 02:02:31PM -0400, The Editor wrote:
> > > On 10/16/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > > > This is a very important ZAP feature--but I can't seem to get it to
> > > > > work on my server.  Works perfect on my home setup.  Must be a php
> > > > > setting?  No clue the connection with pagelist.php. Also, not sure
> > > > > exactly what htmlspecialchars() is doing.  Any thoughts?
> > > >
> > > > For some reason there appears to be an option value being passed
> > > > to the pagelist functions that contains an array instead of a
> > > > normal string.
> > > >
> > > Actually, pagelist is called in the sidebar... Hmmm.  When the sidebar
> > > pagelist is disabled, the form seems to submit properly...
> >
> > Aha!  It's the same bug yet again.  (:pagelist:) accepts arguments
> > coming from $_REQUEST (i.e., a form or a url), and so if any of
> > those parameters are arrays then the pagelist options receive an
> > array, and it gets the error when it tries to set the {$$option}
> > page variables in pagelist templates.
> >
> 
> I'm wondering if this will also solve the problem of when you have a
> pagelist and a searchbox on the same page.  I remember having problems
> with that in the past, and just stopped doing it.  But having
> pagelists in sidebars is useful...

Yes, it's the same problem.  Now fixed in 2.2.0-beta15 (just released).

> > I'm wondering if the "request=0" option should be the default
> > for (:pagelist:).  I don't know how many people are relying on
> > the fact that (:pagelist:) accepts values from a form or url.
> > But it seems that people are surprised when it does, so perhaps
> > the default should be that it doesn't and a special request=1
> > option is required to have it fold in the request options.
> 
> How does one tap into the variables passed to it?  Never heard of any
> recipes using input like that, but it could be interesting...

If the (:pagelist:) directive is

    (:pagelist apple=xyz:)

then a pagelist template can get the value of the apple argument
by using {$$apple}.

Pm




More information about the pmwiki-users mailing list