Last modified: 2014-07-02 09:20:45 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 T67481, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65481 - 'redirect' XML tag is not correctly parsed during XML import
'redirect' XML tag is not correctly parsed during XML import
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-19 12:19 UTC by Sebastian Brückner
Modified: 2014-07-02 09:20 UTC (History)
2 users (show)

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


Attachments

Description Sebastian Brückner 2014-05-19 12:19:10 UTC
Consider the following snippet of an XML dump created using Special:Export:

<mediawiki ...>
 ...
  <page>
    <title>Abcde</title>
    <ns>0</ns>
    <id>27</id>
    <redirect title="Fghij"/>
    <revision>
      <id>111</id>
      <timestamp>2014-05-14T10:27:10Z</timestamp>
 ...

During import, the XML is parsed in WikiImporter::handlePage(). For all tags directly in <page> (like title, ns, id, ...) the info stored in the $pageInfo array is the node content ("Abcde", "0", "27" for the tags above). However, since <redirect is an empty tag, the value in $pageInfo is always an empty string (""). The actual information is stored in the title attribute though.

When accessing the $pageInfo array in hooks (e.g. ImportHandlePageXMLTag), the redirect title is not accessible, since it's not correctly parsed.

I will submit a fix on Gerrit and post the link here.
Comment 1 Sebastian Brückner 2014-05-19 12:26:26 UTC
Here's my proposed fix: https://gerrit.wikimedia.org/r/134079
Comment 2 Gerrit Notification Bot 2014-05-19 23:54:37 UTC
Change 134079 had a related patch set uploaded by TTO:
Correctly parse 'redirect' XML tag during Special:Import.

https://gerrit.wikimedia.org/r/134079
Comment 3 Gerrit Notification Bot 2014-05-28 18:56:42 UTC
Change 134079 merged by jenkins-bot:
Correctly parse 'redirect' XML tag during Special:Import.

https://gerrit.wikimedia.org/r/134079

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


Navigation
Links