Page MenuHomePhabricator

VisualEditor makes redlinked category index pages inacessible
Open, LowestPublic

Description

Categories are separate entities from their description pages.

When accessing a redlink category, currently VisualEditor takes over the page. There does not appear to be any way in natural/discoverable/hidden way in the interface to access this category (short of disabling JavaScript).

Example: https://www.mediawiki.org/w/index.php?title=Category:MediaWiki_Usage_Report_2015&action=edit&redlink=1

  • Shows wikitext editor (with, for a split second, category members listed above).
  • VisualEditor loads (but without the usual dimmed version of the category members, presumably because the page doesn't "exist").
  • No way to exit VE or get to a list of category members.

Note that MediaWiki always links to redlinks in this way. With manual url tampering it's possible to arrive at https://www.mediawiki.org/wiki/Category:MediaWiki_Usage_Report_2015 (which doesn't trigger the editor). However that is not reachable through the natural interface. Even the read/namespace tab points back to action=edit&redlink. As well as linked from the bottom of a page, or as normal page link with :, or from Special:WantedCategories.

Maybe we should disable VisualEditor for the category namespace, until this regression is resolved?

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript

Well we need to take over action=edit if that's how the user has set their preferences. Our hack to prevent multiple editors being shown in most cases prevents the VE client from always being able to pull the text given by the wikitext editor. So we're left with generating the list ourselves...

https://en.wikipedia.org/wiki/Category:All_stub_articles is the largest category on enwiki with just under 2 million articles (and it's not just as simple as articles, there's files and subcategories that you also have to account for with some categories). This means it uses the paging system, involving 'pagefrom' and 'pageuntil' parameters and only showing 200 items at a time.

And I imagine this type of issue applies to more than just category pages, because others such as file pages would have similar issues I expect?

Jdforrester-WMF renamed this task from VisualEditor makes category index pages inacessible to VisualEditor makes redlinked category index pages inacessible.Jul 26 2016, 7:17 PM
Jdforrester-WMF triaged this task as Lowest priority.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

And I imagine this type of issue applies to more than just category pages, because others such as file pages would have similar issues I expect?

Maybe. Though files without a description page are pretty rare. And even then, while pages do have a default "view" (showing upload links and a "File usage" what-links-here section), that view is not shown when visiting redlink=1 nor action=edit. Whereas category pages do show that (which makes sense, since redlinks to categories are much more exposed, and are often reached before the category description is made).

Krenair added a subscriber: AlexMonk-WMF.
Krenair subscribed.

With patch https://gerrit.wikimedia.org/r/441505, it will at least be possible to close VE/NWE after it opens (by pressing Escape), which will redirect to the (usually inaccessible) view URL. This is still not great behavior though.

Note also that when VE/NWE is opened from the view URL (i.e. https://www.mediawiki.org/wiki/Category:MediaWiki_Usage_Report_2015?veaction=edit / veaction=editsource), it actually will display the list of pages under the editor; but the links in the list are not clickable, so that is somewhat useless in practice. This special handling also causes T194068, so I would be inclined to remove it.

image.png (661×1 px, 160 KB)

Change 441509 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Remove special handling for category and file pages

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

In my opinion, the best solution for this task would be to make action=edit&redlink=1 URLs redirect to the view URL for pages in Category: and File: namespaces. I think that would definitely be a better behavior for VE, and probably also for the old/built-in wikitext editor.

Category pages, even when they don't "exist", still display content. File pages almost never should be created manually, but rather by uploading a file.

Note that action=edit&redlink=1 URLs already redirect to the view URL in two cases: if the page actually exists, or if the user doesn't have permission to create it (try a non-existent main namespace page while logged out on enwiki).