Page MenuHomePhabricator

Expanding widgets fails for numerical-only categories with "Problem loading data", no request sent
Closed, ResolvedPublic

Description

Author: dennis_z

Description:
Hi,
Clicking on the "expand" widgets [+] on Wikipedia for numerical (number) only categories gives: "Problem loading data. Please wait a moment and try again" error messages.

To reproduce this problem go to this page, for example...
http://en.wikipedia.org/w/index.php?title=Special:CategoryTree&target=100s
...and click on the "expand" widgets [+] for all the 100, 101, 102...to 109 categories. This gives "Problem loading data. Please wait a moment and try again" error messages.

Then try for the "100s births‎" category on that page, this will work properly, as expected.

It seems that category names made up of 'numbers only' give this error, but if one or more letters are added to the category name, the error does not show.

thanks.

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:02 AM
bzimport set Reference to bz42938.
bzimport added a subscriber: Unknown Object (MLST).

Expanding does not even trigger any outgoing request, so I guess that the shown message is kind of fake already.

From JS code:

		// Don't make a request if there is no title.
		if ( typeof ctTitle !== 'string' ) {
			error();
			return;
		}

This should be something like "if ( !ctTitle ) {" istead.

I just checked mw 1.22.0 (a private wiki) and this problem sadly still exists :-(

And actually the problem is also present in 1.23wmf8 as you can see here: https://en.wikipedia.org/w/index.php?title=Special:CategoryTree&target=100s

Problem still existing in MW 1.24.0

Problem is still present in 1.25alpha (3bb71d9)

I got this fixed today thanks to marktraceur in the IRC channel. Apparently around Jan. 14th Commons was struck with broken Javascript as well. The HotCat gadget was the cause. Updating my HotCat to the one here: https://commons.wikimedia.org/wiki/MediaWiki:Gadget-HotCat.js fixed my wiki.

However, it took hours to take effect. So I wonder if there's some caching happening somewhere that prevents GadGet code changes from immediately taking effect? I completely cleared my browser's cache many times and this had no effect.

Thanks for the post. I have the HotCat.js code from https://commons.wikimedia.org/wiki/MediaWiki:Gadget-HotCat.js but still have the problem.

Also, the 'how to reproduce the problem' examples at http://en.wikipedia.org/w/index.php?title=Special:CategoryTree&target=100s still have the problem, so there may still be some other issues.

FWIW, after I updated the HotCat.js code, it took approximately 2-3 hours before my wiki started working again. I'm not sure why. Maybe there's some caching going on somewhere.

We don't seem to have a HotCat gadget installed in our local wiki, yet the categorytree chokes on some (but not all) numerical categories.

I had a page named "6.31" that belonged to the "6.31" category. Moving this page to "6.35 Pilot 1", creating a new 6.35 category and deleting all traces of 6.31 did not help. Yet I do have a working "6.30" category with a page called "6.30 Patch 1" in it.

Tested on 1.27.0-wmf.10 (8c14316) - problem still exists.

Patch at https://gerrit.wikimedia.org/r/429646/. Basically as suggested by @Schnark way back in 2013. Not tested, but it seems as though it should fix the problem without introducing new ones.

Change 429646 merged by jenkins-bot:
[mediawiki/extensions/CategoryTree@master] Fix display of categories with numeric names

https://gerrit.wikimedia.org/r/429646

TheDJ removed a project: Patch-For-Review.