Last modified: 2011-11-17 23:29:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 30718 - UploadWizard should not suggest categories that do not exist
UploadWizard should not suggest categories that do not exist
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 30880 (view as bug list)
Depends on: 26411
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-03 03:47 UTC by Krinkle
Modified: 2011-11-17 23:29 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2011-09-03 03:47:49 UTC
On Commons, eg when typing "Coins" there are suggestions like "Coins+of+Caligula" which do not exist. They don't have a category-namespace page and it doesn't have any members:

mysql> select * from category where cat_title like 'Coins+%'\G
cat_id: 8834485
cat_title: Coins+of+Caligula
cat_pages: 0
cat_subcats: 0
cat_files: 0
cat_hidden: 0
1 row in set (0.00 sec)
Comment 1 MZMcBride 2011-09-12 22:55:23 UTC
*** Bug 30880 has been marked as a duplicate of this bug. ***
Comment 2 TMg 2011-10-01 10:46:46 UTC
Same problem here. It suggests "Test123" and other strange stuff that was either deleted or never existed as a category.
Comment 3 Saibo 2011-11-17 22:29:27 UTC
Confirmed on Commons by typing "Test" → Test123 is suggested and even blue linked!
Comment 4 Saibo 2011-11-17 22:41:47 UTC
from dev chat: it suggests apparently all categories which have ever been used (that doesn't mean that the cat pages need to have been existent)
Comment 5 Ian Baker 2011-11-17 22:44:44 UTC
The API returns stuff that UW doesn't care about.  The right solution is probably to add a config option that disables suggestion of categories that lack a description page.  Then, call one of:

list=allpages&apnamespace=14&apprefix=foo

list=allcategories&apnamespace=14&apprefix=foo

depending on how that config var is set.

(note to self: in mw.ApiCategory.js line 46 or so)
Comment 6 Neil Kandalgaonkar 2011-11-17 22:54:37 UTC
Suggested way to proceed.

1 -- change the API call to use parameters not like this: 

action=query&generator=allcategories&gacprefix=Test&prop=info

but like this

&apnamespace=14&apprefix=foo

Which tests for pages in the Category namespace -- subtly different from looking to see if something is in the Category table. If that is efficient enough. Note that 14 is the usual namespace for categories but it should be obtained from config.


2 -- if a category was not found via API, render it as red in the interface. 

We already are checking if the category exists (a dialog box is thrown up to ask if the user is really sure) so this should not be difficult
Comment 7 Ian Baker 2011-11-17 23:29:15 UTC
Okay, we now only suggest categories that have description pages.  See r103523

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links