Last modified: 2014-02-15 14:10:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32129, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30129 - $key part of links placeholders not saved in Parser->serialiseHalfParsedText()
$key part of links placeholders not saved in Parser->serialiseHalfParsedText()
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-30 15:10 UTC by Bastien Montagne
Modified: 2014-02-15 14:10 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bastien Montagne 2011-07-30 15:10:04 UTC
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)…

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links