Page MenuHomePhabricator

Time-dependent conditionals (#ifeq, #switch, etc.) can leave link tables inconsistent
Open, LowPublic

Description

By using the conditional parser functions #ifeq, #ifexpr or #switch together with #time (or with time-dependent magic words such as CURRENTDAY), a page can be made to parse and render differently at different times. However, the link tables (pagelinks, imagelinks, templatelinks and categorylinks) will only contain links that were present when the page was parsed.

This is closely related to bug 14404, but I'm filing this separately since the proximate cause is different, and since I suspect they'll need separate fixes.

I particular, this can cause cascading protection to fail unexpectedly if such time-dependent conditionals are used on the protected page. Of course, the workaround is to just not do that, but not all users may know that. (And, unfortunately, many of the pages most likely to need cascading protection are also the ones most likely to benefit from time-dependent parsing.)


Version: 1.15.x
Severity: minor
URL: http://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&oldid=20274720#Cascading_protection_broken.3F
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=57256

Details

Reference
bz18478

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:31 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz18478.
bzimport added a subscriber: Unknown Object (MLST).

Actually, changing component from Extensions / ParserFunctions to MediaWiki / Page rendering, since I believe the same problem can also be caused by plain transclusion (with time-dependent template names) without using ParserFunctions.

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

Can we update links tables every time a new ParserOutput is generated and differs from current links table data (that is like, api.php?action=parse&forcelinkupdate is always used)? A similar thing is already there to update category info.

This can more or less resolve bug 34039, bug 31628 etc.

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

joedecker wrote:

In terms of effects, note that we actually have bot tasks, and discussions around same, on ENWIKI to work around this, see, for example: http://en.wikipedia.org/wiki/Wikipedia:Bots/Requests_for_approval/Joe%27s_Null_Bot

Which is pretty kludge, and we may wish to expand that to 1K articles/day getting bot-bumped.

A workaround, such as expiring category tables after a day would address that particular need, as would a general fix (such as that Liangent proposes.)