Page MenuHomePhabricator

$key part of links placeholders not saved in Parser->serialiseHalfParsedText()
Open, LowPublic


Author: montagne29

In MW 1.16.2, the $key part of the links placeholders is not saved in “serialised” links by Parser->serialiseHalfParsedText().

L.5121: $links['internal'][$ns][] = $this->mLinkHolders->internals[$ns][$key];

The $key is assumed to be evenly growing integer, but in some cases this gives wrong results – eg on blenderwiki, we had only one link on ns102: 102:358, which got “serialized” as 102:0… Obviously, that link is lost! (and at deserialisation, it produces a debug warning, as not found in parser’s links).

The solution is trivial – just use $key in $links array as well:

L.5121: $links['internal'][$ns][$key] = $this->mLinkHolders->internals[$ns][$key];

Note the problem is the same for interwiki links (l.5131)…

Version: 1.16.x
Severity: normal



Event Timeline

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