Topic on Project:Support desk

Jump to navigation Jump to search

Broken "next 200" link on category page?

8
135.245.10.2 (talkcontribs)

I think this issue arose when upgrading from 1.16.1 upgrading to 1.18.0...

A user noticed than none of the "next 200" links work on my category pages

example: http://www.fraternityofshadows.com/wiki/Category:NPC

If you click on "next 200" it just goes back to the same page.

Tried to debug a bit myself, but I'm a novice in php. I did notice that the link leads to: http://fraternityofshadows.com/w/index.php?title=Category:Year&pagefrom=492+BC#mw-pages

yet the keyword "pagefrom" doesn't appear anywhere in my installation, according to a recursive grep.

Any way to fix this?


Ron admin@fraternityofshadows.com

74.102.75.98 (talkcontribs)

digging further... "pagefrom" doesn't appear because it's built up from "page" and "from" within includes/CategoryPage.php. It appears that my problem is due to something going wrong in the neighborhood of the doCategoryQuery function in that file. I see by comparing to my old 1.16 installation, that things have changed a bit there. This is apparently where the mySQL database is queried and sorted to find the next page to start from.

Is there perhaps some update needed to the mySQL database structure that the update script failed to do?

The old lines here had: array( $pagecondition, 'cl_to' => $this->title->getDBkey() ),

while the new has this: array_merge( array( 'cl_to' => $this->title->getDBkey() ), $extraConds),

could that be the reason for the issue I'm having? I don't know enough about php or MySQL to know exactly what's going on here, but it looks like this is the area of the code in question, and the only reason I could see it not work for me is if the code doesn't match the database somehow. Any experts have a better idea? Thanks....

Subfader (talkcontribs)

Upgrading from 1.16 took heavy database changes esp. to categories. I think you can run maintenance/update.php at any time tho.

74.102.75.98 (talkcontribs)

Thanks, I just ran maintainence/update.php again as you said, and it didn't do much. It spit out a lot of "___ is already ___", "___ already exists" and "____ doesn't exist" messages, and the problem persists. Is there any other script I might need to run in maintainence that would fix up the category links or whatever is messed up here? Any way to verify my database is truly in the right format? If the database is in the right format, and the MW installation is up-to-date, what else could be wrong?

Bawolff (talkcontribs)

That's an odd issue.

I had a look at the api output for your site () and it outputted things the way they're supposed to look. If it was a db issue, the output would probably look wrong for the api (sortkeyprefix being "" is normal in that api output in case you're wondering).


What seems to be the problem is that the category page is just not responding to url parameters. However, it is responding to the older url parameters for categories .

Theory 1:

Wrong version of CategoryTree. Older versions of Category tree break categories in weird ways on newer mediawiki. Make sure you have the version of CategoryTree that goes with MediaWiki 1.18. If you're not sure, temporarily disable that extension, see if the categories fix themselves, that way you could rule it out if its being caused by that extension.

Theory 2

Maybe One of the files in your install was not updated properly (although, if that happened I'd imagine more things would be broken). Could you check that includes/CategoryPage.php in your install is exactly the same as the official version - http://svn.wikimedia.org/svnroot/mediawiki/tags/REL1_18_0/phase3/includes/CategoryPage.php (especially the closeCategory method ) [However, check the categorytree thing first].
74.102.75.98 (talkcontribs)

Wahoo!!! Thanks, Bawolff. Updating CategoryTree did the trick. I had the 1.15 version, and since it was "working" (in that I could see the categoryTree ajax buttons and they expanded correctly), I didn't think I needed to upgrade it. I never thought that it could cause trouble elsewhere on the page.

Many, Many, Many thanks...

Noham100 (talkcontribs)

Hi, I have the same problem,but I can't find where to disable CategoryTree. Can you guide me where I can find it? Am i required to backup before disabling CategoryTree?

Ciencia Al Poder (talkcontribs)

Comment or remove the line that includes the extension CategoryTree in your LocalSettings.php

Reply to "Broken "next 200" link on category page?"