Page MenuHomePhabricator

VisualEditor: Category editor should also suggest categories which 'exist' but are without a description page
Closed, ResolvedPublic

Description

Users and categories should not be auto-completed based on page names (API action=opensearch) but instead based on their own respective query modules (list=allusers, list=allcategories) because the existence of a description page is optional and neither a subset nor superset of the database tables.

  • Pages can exist for inexistent objects.
  • Objects often don't have an associated page.

718db58f introduced category editing with autocompletion from opensearch (with hardcoded 'Category:' prefix). This should be switched to using list=allcategories instead.

That way the input field will no longer include results for inexistent categories, and no longer omit results for existing categories lacking a description page.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=65517

Details

Reference
bz49044

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:41 AM
bzimport set Reference to bz49044.

Though I commend the effort for correctness, I don't think that this has ever even been brought up in the HotCat feedback. It would be nice though.

However, an empty category (page only), is still a valid category in most workflows (you have to start somewhere), so I think that excluding them is no more correct than including categories without pages...

(In reply to comment #1)

Though I commend the effort for correctness, I don't think that this has ever
even been brought up in the HotCat feedback. It would be nice though.

However, an empty category (page only), is still a valid category in most
workflows (you have to start somewhere), so I think that excluding them is no
more correct than including categories without pages...

(Whilst not defending the current MediaWiki behaviour) the way you start a new category is either:

  • Create the description page
  • Add pages to it from wikitext with [[Category: <name> ]]

or:

  • Implicitly create it by adding pages to it from wikitext with [[Category: <name> ]]

The same is true for HotCat, afaik you can use a category that doesn't exist yet. The page is optional and the 'Category' table row will be created once there are items in it (though it doesn't delete the row if there are no more children in it, so you can still have category pages for categories that don't "exist" but do exist in the database).

Either way I think it is more likely for a user to want to add a page to a category that is used on another page (which may or may not have a description page yet) then for a user to first create a category page and then add a page to it. Especially on established wikis.

I agree it doesn't really make sense but this is how MediaWiki works. We could change MediaWiki core to also create category rows immediately when the page is created.

We could do 2 ajax requests for every autocomplete action but that seems a bit too much, and given the choice between the two I think completing based on existing categories instead of category description pages, the former is more likely and also has larger volume (there are more categories than there are description pages, there are relatively few category pages for categories that don't exist, ideally a wiki would have none of them).

Change 135782 had a related patch set uploaded by Alex Monk:
Suggest categories that exist but don't necessarily have pages

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

Change 135782 merged by jenkins-bot:
Suggest categories that exist but don't necessarily have pages

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

  • Bug 65956 has been marked as a duplicate of this bug. ***