Page MenuHomePhabricator

ProofreadPage: Source tab should not appear on the Main Page
Closed, ResolvedPublicBUG REPORT

Description

Any transclusion of a Page: namespace page onto the Main Page invokes a "Source" tab at the top (on Wikisources like enWS where the Main Page is still in NS0):

2021-12-20_095017_818x196_screenshot.png (196×818 px, 46 KB)

Normally this is not an issue, since it's not usual to directly transclude page content to the main space. However, the Lua API uses a "transclusion" link to report a dependency on the pages, so progress bars for indexes can trigger the tab, even though no actual content is transcluded.

Probably the tab should just be suppressed on the main page.


Ideas:

  • This can be done client-side until T239033 by just checking mw.config.get( 'wgIsMainPage' )
  • On the server side, it could probably happen somewhere near TranslusionPagesModifier::modifyPage, as long as there's a way to get the title of the page in question out, then you can just use isMainPage() on it.
  • Or maybe there's a way to report a parser dependency without including the page in the "embeddedin" list, which would also be helpful to avoid spamming the list of embeds under the edit window with thousands of Page pages when editing a page that uses the Lua stats. Though a quick perusal of ParserOutput does not look like so.

Original report: https://en.wikisource.org/wiki/User_talk:Inductiveload#Module%3APotM%2Fdata

Event Timeline

Change 748702 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/ProofreadPage@master] Avoid adding index-specific data to the main page

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

Change 748702 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Avoid adding index-specific data to the main page

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

Inductiveload claimed this task.