Page MenuHomePhabricator

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


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).

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.

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

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

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

Invalid as the count is no longer in the summary