https://bugzilla.wikimedia.org/show_bug.cgi?id=65481

            Bug ID: 65481
           Summary: 'redirect' XML tag is not correctly parsed during XML
                    import
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Export/Import
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to