[pmwiki-users] Strange searchbox bug.

The Editor editor at fast.st
Thu Mar 23 09:59:46 CST 2006


I'm not sure I understand exactly what you are describing, but I take
it that since the SearchBox is loaded after the PageList, the
SearchBox sets the search criteria (in the url), and the page thus
pulls back one result which is plugged into both the PageList and
SearchBox (not what I want, but understandable).

And that to fix we might need to give an optional extra parameter to
one or both so a key can be tagged to each query (thus submitting two
queries in the url), and which is again used to send the two results
to the appropriate places in the page.  Am I understanding this right?

If so, couldn't we keep the defaults as they are to avoid breaking
existing sites, and make the optional parameter only necessary when
you have more than one pagelist or searchbox on a page.  Some of code
tagging the resulting query to the appropriate box.

Or would it be possible to do a separate custom markup which
reproduces the simple pagelist, but slightly tweaked so as to not
conflict with the searchbox? i.e., doing the pagelist in a separate
function rather than in the page?

Just a thought!

Cheers,
Caveman



On 3/23/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Wed, Mar 22, 2006 at 10:26:53PM -0500, The Editor wrote:
> > I have a pagelist feature in my sidebar that lists various pages in
> > one group.  In the main part of my page I have a searchbox that
> > searches several groups (including the one in the sidebar).
> >
> > When I run the search, the content of my pagelist is immediately
> > transformed to reflect the results of the searchbox (it is also shown
> > in the main page where it is supposed to be).  Any ideas why it is
> > doing this?  Is it a bug that should be reported to PITTS?
>
> It's not really a "bug" in the sense that PmWiki is doing what
> it's supposed to do in this case.
>
> Both pagelists and searchresults use the same code, and accept
> arguments from submitted forms and the URL query.  So, if you
> enter something in a search box, it affects the search results
> as well as any displayed pagelists.
>
> Arguably this will be confusing for pagelists in sidebars and the
> like.
>
> I think (:pagelist:) and (:searchresults:) should get a "request="
> parameter that indicates whether the listing should use
> parameters coming from the commandline.  Then it's a question
> of what the defaults should be; clearly (:searchresults:) should
> default to looking at a request.  I'm thinking that (:pagelist:)
> should default to not looking at request items, but this might
> break some existing sites, so I'm not sure what to do there.
>
> Comments?
>
> Pm
>
>




More information about the pmwiki-users mailing list