Page MenuHomePhabricator

Pagination doesn't work on Special:PrefixIndex with no prefix
Closed, ResolvedPublic

Description

Author: ipatrol6010

Description:
I have found a small but annoying problem inthe appendix list. When I try to scroll through the list of appendices, I find that the next page has only one entry-which, strangely begins with the letter G.
User:Mathmagic 00:40, 20 August 2008 (UTC)
(Copy of original report, this user is not related to the sender of this bug)


Version: unspecified
Severity: normal
URL: http://en.wiktionary.org/wiki/Wiktionary:Bug_reports

Details

Reference
bz16434

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:26 PM
bzimport set Reference to bz16434.

Not sure what this is? Wiktionary has an "Appendix" namespace, but what do you mean by the "list of appendicies?" Are you refering to the PrefixIndex that [[Appendix:Contents]] links to, or the Appendix category? Can't do much without more info. Also, switching to "MediaWiki" issue since its probably not a problem with Wikimedia.

Suggest INVALID without more info...

I have understood it!

Go to Special:PrefxIndex and search on Appendix namespace for pages starting on anything
http://en.wiktionary.org/w/index.php?title=Special%3APrefixIndex&from=&namespace=100

It ends on 'Glossary of backgammon', and there's a 'Next page' link http://en.wiktionary.org/w/index.php?title=Special:PrefixIndex&from=Glossary_of_backgammon_terms&namespace=100

But that link shows pages beginning on 'Glossary of backgammon', instead of pages beginning on anything from 'Glossary of backgammon'.

The expected page is probably similar to http://en.wiktionary.org/w/index.php?title=Special:AllPages&namespace=100&from=Glossary_of_backgammon_terms&to=List_of_Proto-Indo-European_roots%2Fb%CA%B0

  • Bug 16032 has been marked as a duplicate of this bug. ***

I can, directly on the links provided by Platonides. If you click the first link he gave, it shows you Special:Prefixindex (ignore the firstHeading name, I think they customized it). You see a pagination link in the upper right corner that would *lead* you to believe it's the next page worth of results. However, it instead gives you that title as your prefix, not a 2nd page of results.

(In reply to comment #4)

Can't reproduce this

Check my description in duped bug.

(In reply to comment #4)

Can't reproduce this

I can. It works fine when you're using Prefixindex with an actual prefix, but when you blank the prefix box, click Go, then click Next page, you get this bug.

The cause seems to be that the Next page link doesn't include the &prefix=foo parameter, which is there when using a prefix but absent when not using one; adding &prefix= to the URL gives the expected result.

This seems to occur only if the given prefix is empty

ipatrol6010 wrote:

The problem still exists, please try again.

mike.lifeguard+bugs wrote:

(In reply to comment #10)

The problem still exists, please try again.

r47984 isn't live - we're running r47457 currently.

herd wrote:

Note for posterity: This introduced a new bug, as the 'from' parameter behavior was changed, but 'from' was still being used for the name of the input box field. So Special:Prefixindex/Foo was behaving differently than putting Foo in the text box. r48845 should have fixed this.

Problem still exists.

See for instance http://cs.wikisource.org/wiki/Special:PrefixIndex/Category: and hit the "Next page" link (currently "Next page (František Xaver Šalda)") and it will take you to http://cs.wikisource.org/w/index.php?title=Speci%C3%A1ln%C3%AD:PrefixIndex&from=Franti%C5%A1ek_Xaver_%C5%A0alda&namespace=14 which is obviously totally wrong, because it should show all further categories starting from category František Xaver Šalda.


Adding code-update-regression keyword, because it *used to work properly* prior to 2008-10-19 when I reported the bug 16032, so you can use that date to find out which changes have been done to relevant code in those days.

The link http://en.wiktionary.org/w/index.php?title=Special%3APrefixIndex&from=&namespace=100 still shows the same problem. Unlike in Roan's comment from 2 years ago, the problem still shows up on http://en.wiktionary.org/w/index.php?title=Special%3APrefixIndex&from=&namespace=100&prefix=

Danny, did you notice a change in this behavior recently? (e.g, past month or so, it was fine, but now it isn't.)

Adding code-update-regression keyword, because it *used to work properly* prior
to 2008-10-19 when I reported the bug 16032, so you can use that date to find
out which changes have been done to relevant code in those days.

That was probably introduced in r39873 (making SpecialPrefixindex a class child of SpecialAllpages).
ialex, can you look at it?

  • Bug 29413 has been marked as a duplicate of this bug. ***

Problem still happening:

  1. http://translatewiki.net/w/i.php?title=Special:PrefixIndex/Template%3A
  2. Link "next" http://translatewiki.net/w/i.php?title=Special:PrefixIndex&from=Identical%2FLoading&namespace=10
  3. Shows only list item with [[Template:Identical/Loading]]
  4. Should instead show the next pages.
  5. Simply replacing "PrefixIndex" with "AllPages" gives the desired effect: http://translatewiki.net/w/i.php?title=Special:AllPages&from=Identical%2FLoading&namespace=10
  • Bug 32715 has been marked as a duplicate of this bug. ***

Lemme see if I can fix this up once and for all. :)

Ok looks like there are two problems:

  1. Special:Prefixindex uses 'from' to fill the prefix if there's no or empty prefix
  1. wfArrayToCGI() strips out empty parameters, so if prefix is empty it doesn't even get passed through to the 'next' link.

I could fix 1 but be left with 2. Not sure what undoing the stripping in wfArrayToCgi() would do -- it's been this way since at least r34823

(In reply to comment #20)

Ok looks like there are two problems:

  1. Special:Prefixindex uses 'from' to fill the prefix if there's no or empty

prefix

  1. wfArrayToCGI() strips out empty parameters, so if prefix is empty it doesn't

even get passed through to the 'next' link.

I could fix 1 but be left with 2. Not sure what undoing the stripping in
wfArrayToCgi() would do -- it's been this way since at least r34823

You could fix #1 by doing something hacky with a hidden input perhaps?

"Fixing" #2 sounds scary and liable to break Who Knows What.

Actually I'm just going to use the namespace parameter. :P

Fixed on trunk (for 1.19) in r104765.

Fixed on trunk (for 1.19) in r104765.

  • Bug 32790 has been marked as a duplicate of this bug. ***
Danny_B raised the priority of this task from Low to Medium.
Danny_B added a project: Regression.

Reopening per comment above.

Please create a new task. This is definitely not the same cause as in 2011. It didn't regress or get reverted for the same reason. Also, pagination is broken for all queries, not just when the prefix is empty.

If this was a feature task then reopening would make sense, but it's a bug report.

New report: T136738