UploadWizard should not suggest categories that do not exist
Closed, ResolvedPublic

Description

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)


Version: unspecified
Severity: normal

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz30718.
Krinkle created this task.Via LegacySep 3 2011, 3:47 AM
MZMcBride added a comment.Via ConduitSep 12 2011, 10:55 PM
  • Bug 30880 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitOct 1 2011, 10:46 AM

mr.heat wrote:

Same problem here. It suggests "Test123" and other strange stuff that was either deleted or never existed as a category.

bzimport added a comment.Via ConduitNov 17 2011, 10:29 PM

saibotrash wrote:

Confirmed on Commons by typing "Test" → Test123 is suggested and even blue linked!

bzimport added a comment.Via ConduitNov 17 2011, 10:41 PM

saibotrash wrote:

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)

bzimport added a comment.Via ConduitNov 17 2011, 10:44 PM

ibaker wrote:

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)

bzimport added a comment.Via ConduitNov 17 2011, 10:54 PM

neilk wrote:

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

bzimport added a comment.Via ConduitNov 17 2011, 11:29 PM

ibaker wrote:

Okay, we now only suggest categories that have description pages. See r103523

Gilles added a project: Multimedia.Via WebDec 4 2014, 10:27 AM
Gilles raised the priority of this task from "Normal" to "Unbreak Now!".Via WebDec 4 2014, 10:29 AM
Gilles moved this task to Closed on the Multimedia workboard.
Gilles lowered the priority of this task from "Unbreak Now!" to "Normal".Via ConduitDec 4 2014, 11:22 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.