Page MenuHomePhabricator

[CatWatch] Ignore Lua-transcluded pages in summaries
Closed, InvalidPublic

Description

With Lua transclusion I'm referring to the side effect of invoking mw.title:getContent() on any page. Per mw:Extension:Scribunto/Lua reference manual:

getContent(): Returns the (unparsed) content of the page, or nil if there is no page. The page will be recorded as a transclusion.

That is, whenever a Lua module is invoked on page A and retrieves the content of page B using this function, A is recorded as a transclusion in Special:WhatLinksHere/B. Now, if we categorize B in Category:X, CatWatch would notify about this transclusion even if no additional page was added to Category:X: [[B]] and one page added to category (see i18n messages recentchanges-page-added-to-category-bundled and recentchanges-page-removed-from-category-bundled).

It's also possible for a page to retrieve its content with Lua, in that case it references itself on WhatLinksHere. Since there is an use case for this on plwiktionary (see task description in T109638), we are seeing lots of superfluous and one page added to/removed from category bits in log comments with CatWatch enabled (RC).

Details

Related Gerrit Patches:

Event Timeline

PeterBowman raised the priority of this task from to Needs Triage.
PeterBowman updated the task description. (Show Details)
PeterBowman added a subscriber: PeterBowman.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 10 2016, 12:07 AM
Tobi_WMDE_SW set Security to None.
Tobi_WMDE_SW added a subscriber: Tobi_WMDE_SW.

So as far as I can tell this is just about summaries?

So as far as I can tell this is just about summaries?

That's correct.

PeterBowman renamed this task from [CatWatch] Ignore Lua-transcluded pages to [CatWatch] Ignore Lua-transcluded pages in summaries.Feb 10 2016, 2:43 PM
Tobi_WMDE_SW triaged this task as Low priority.Feb 24 2016, 1:08 PM

So as far as I can think the only way to solve this would be to record getContent() in a different way, for example possible transclusions rather than actual transclusions.

This would probably either require a new table, called lualinks / usages (or something similar).

Or this would require a new field in the templatelinks table to indicate what type of link it was.

Change 281195 had a related patch set uploaded (by Addshore):
CatWatch don't show the number of pages transcluded

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

Change 281195 merged by jenkins-bot:
CatWatch don't show the number of pages transcluded

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

Addshore closed this task as Invalid.May 11 2016, 1:31 PM

Invalid as the count is no longer in the summary