[pmwiki-users] PITS/00713: bug using category subjects is search terms

slonik.az at gmail.com slonik.az at gmail.com
Sun Mar 26 14:56:00 CST 2006

Today I submitted a new http://www.pmwiki.org/wiki/PITS/00713
that describes a serious bug in pmwiki search functionality that was
introduced in pmwiki-2.1.beta27 and is still present in 2.1.3.

For convenience I included below the full text of PITS/00713

Summary: bug using category subjects in search terms Created: 2006-03-26
Status: Open
Category: Bug
From: Leo <http://www.pmwiki.org/wiki/Profiles/Leo>
Priority: 55
Version: 2.1.3 (all versions since 2.1.beta27)
OS: all platforms

Description: This bug was introduced in pmwiki-2.1.beta27 and is still
present in pmwiki-2.1.3


In Pmwiki syntax Category subject terms start with exclamation sign "!" e.g.
"!Calendar". When one enters search query that consists of two terms one (or
both) of which are category subject, pmwiki treats both terms as mere words
dropping special meaning of "!".

To reproduce the bug perform the following steps:

   1. Open http://www.pmwiki.org
   2. In a search box enter "!Calendar" (without quotes). The results, as
   it should be, will match 4 wiki pages that contain Category subject
   3. Now, in a search box enter (without quotes) "new !Calendar" (remove
   the quotes). Surprisingly, the search result matches 40 pages. Their
   analysis shows that these 40 pages simply contain words "new" and
   "calendar". Special meaning of "!Calendar" as a category subject has been
   lost. Another way of looking at this: adding new term "new" to the old query
   "!calendar" (logical AND) should not result in finding more matches.

As a matter of fact, pmwiki-2.1.beta26 performs category subject searches


As a simple (and temporary) way of fixing the bug I replaced
MakePageList (file scripts/pagelist.php) with the corresponding one from
pmwiki-2.1.beta26. Now category searches operate as expected.

I Hope that this bug in core Pmwiki functionality will be given proper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060326/a8974fb7/attachment.html 

More information about the pmwiki-users mailing list