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.

SmartK added a comment.Jan 3 2014, 2:44 PM

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

TheDJ added a subscriber: TheDJ.Dec 8 2014, 11:39 AM

Problem still existing in MW 1.24.0

Wmat added a subscriber: Wmat.Jan 16 2015, 1:27 AM
Wmat added a comment.Jan 16 2015, 2:27 AM

Problem is still present in 1.25alpha (3bb71d9)

Wmat added a comment.Jan 16 2015, 7:45 PM

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.

Wmat added a comment.Jan 17 2015, 3:46 PM

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.

9Rune5 added a subscriber: 9Rune5.Feb 10 2015, 9:37 AM

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.

Danny_B set Security to None.

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

TTO claimed this task.Apr 29 2018, 3:16 AM

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 closed this task as Resolved.May 9 2018, 4:20 PM
TheDJ removed a project: Patch-For-Review.