Page MenuHomePhabricator

impossible to list allpages or prefixindex for pages starting with . or ..
Open, LowPublic

Description

in at least Special:Allpages and Special:prefixindex, it is impossible to search for "all the pages starting with '.' " or '..' strangely enough, it works correctly with 3 or more points.

Any idea of what causes this behaviour ?

This also affects trailing spaces and underscores in at least prefixindex per duplicate T19094.

Details

Reference
bz10473

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:51 PM
bzimport set Reference to bz10473.
bzimport added a subscriber: Unknown Object (MLST).

ayg wrote:

I suspect Apache is trying to cleverly interpret that as a directory or something. [[Special:Prefixindex/..]] just flat-out redirects to /wiki/. I don't know why it would try to do anything like that with query parameters, though. Pretty peculiar.

Special:Allpages tries to normalize the prefix by making a title object out of it; however '.' and '..' by themselves are illegal titles (to avoid those path problems).

The result is that the prefix / starting-point request is ignored, leading to this bug.

A fix might be to add a partial-name-validation routine of some sort, or.... something. :P :)

Adjusting summary to clarify that this is prefixindex/allpages issue, not special:search issue.

(In reply to comment #2)

Special:Allpages tries to normalize the prefix by making a title object out of
it; however '.' and '..' by themselves are illegal titles (to avoid those path
problems).

The result is that the prefix / starting-point request is ignored, leading to
this bug.

A fix might be to add a partial-name-validation routine of some sort, or....
something. :P :)

The list=allpages API module had similar issues; see bug 15275, bug 15471 for the issues, and r39935, r39936 (reverted in r39938), r39935, r40088, r40432 for attempts to solve them. The solution currently being used (as of r40432) introduces the ApiQueryBase::titlePartToKey() and keyPartToTitle() functions for normalizing title prefixes. They append an 'x' to their input, normalize that using ApiQueryBase::titleToKey() or keyToTitle() (which in turn use a Title object), then strip the 'x' again. Of course this is an ugly hack, and Title should really have this functionality on board. Maybe add a User::getCanonicalName()-style parameter somewhere?

Also, it could be useful to add that http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=. and apprefix=.. do work. So there's hope for this bug yet :)

  • Bug 52010 has been marked as a duplicate of this bug. ***
MPhamWMF subscribed.

Closing out low/est priority tasks over 6 months old with no activity within last 6 months in order to clean out the backlog of tickets we will not be addressing in the near term. Please feel free to reopen if you think a ticket is important, but bare in mind that given current priorities and resourcing, it is unlikely for the Search team to pick up these tasks for the indefinite future. We hope that the requested changes have either been addressed by or made irrelevant by work the team has done or is doing -- e.g. upgrading Elasticsearch to a newer version will solve various ES-related problems -- or will be subsumed by future work in a more generalized way.

re-opening. Because obviously.