When #ifexists target page is created/deleted, does not update links tables
OpenPublic

Assigned To
None
Priority
Normal
Author
Anomie
Subscribers
liangent, matmarex, Anomie and 4 others
Projects
Reference
bz31628
Description

Consider a page "SourcePage" containing wikitext like this:

{{#ifexist:TargetPage|Exists.[[Category:Foo]]|Does not exist.[[Category:Bar]]}}

Assume that when the above is first added to SourcePage, TargetPage does not exist. SourcePage is therefore categorized in Category:Bar.

Then create TargetPage. SourcePage is correctly purged, showing "Exists" and showing Category:Foo at the bottom of the page. But if you actually look at the two categories, SourcePage remains in Category:Bar and is not found in Category:Foo.

This same thing happens with image links (the list at the bottom of the image page is wrong) and template transclusion links (the list in the template's Special:WhatLinksHere output is wrong). I haven't tested external links, interwiki links, language links, or the like, but they are probably wrong too.

A null edit to SourcePage will, of course, fix all these problems, but it shouldn't be necessary.


Version: 1.18.x
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=12019

bzimport added a project: MediaWiki-Parser.Via ConduitNov 21 2014, 11:53 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz31628.
Anomie created this task.Via LegacyOct 11 2011, 11:55 PM
brion added a comment.Via ConduitOct 12 2011, 12:30 AM

Is this on a local test install or on one of the Wikimedia sites? IIRC we run cleanup of referenced pages through the job queue, so there may be some delay before everything gets invalidated.

Anomie added a comment.Via ConduitOct 12 2011, 3:26 AM

Tested mainly on enwiki, but I just ran the same test on my local install (currently r99582) and observed the same behavior.

Is the job queue currently behind by ''hours'' when dealing with simple sandbox pages not linked from anywhere else?

bzimport added a comment.Via ConduitMay 21 2012, 12:26 AM

joedecker wrote:

Speaking from my experiences on ENWIKI, there is a general feature/bug/behavior that template-inserted categories don't update until there's a null edit or better, as a rule. This impression seems confirmed to me by my reading of http://en.wikipedia.org/wiki/Wikipedia:NULLEDIT#Null_edit

I have been told by a knowledgable user (as I've been pursuing a BRFA for a bot to deal with the trouble this is causing a single particular maintenance category at ENWIKI) that this relates to purge, etc., not updating the "categorylinks table."

I'd be interested in knowing if that is in fact the case, if so if this is a problem that can/will be fixed, or if instead the performance implications of fixing it would be prohibitive. I can suggest/create workarounds at varying degrees of cost, but first, if this is just a general bug that's easily fixed, that'd be useful data. Thanks.

MZMcBride added a comment.Via ConduitOct 31 2012, 4:33 AM

This seems related to bug 12019 ("ifexist function uses pagelinks table in lieu of better options"). Since ifexist is using the pagelinks table, I'm not sure why updates aren't working properly.

liangent added a comment.Via ConduitOct 31 2012, 4:42 AM

(In reply to comment #4)

This seems related to bug 12019 ("ifexist function uses pagelinks table in lieu
of better options"). Since ifexist is using the pagelinks table, I'm not sure
why updates aren't working properly.

I guess when a page is created/deleted, pages with pagelinks to it are only cleared from parser cache, but not reparsed (with linksupdate). Because traditional "pagelinks" change doesn't need linksupdate.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.