Page MenuHomePhabricator

Import problem
Closed, ResolvedPublic

Description

Author: bugzilla.wikimedia

Description:
I previously reported this bug but it was closed due a a lack of explanation
on how to reproduce it.

Here is how to reproduce it.

  1. On any wiki, create an article with the title :

Han s/ Lesse

(mind the slash)
and the content is e.g. :

''Han s/ Lesse'' is a nice belgian village located on the river ''Lesse''.
<br>''s/'' should be prononced ''sur'' and means, in english, ''on'' (in german
: oder)

  1. now use the export functionnality

(I'll upload the file han-sur-lesse.xml for your facility but you can easely
generate it your self).

  1. now, on a wiki where you are a sysop, try to import.

you'll get the error message : mismatched tag ...

  1. the reason of the message and the bug are that the title includes a slash,

(which is not something unusual, at least to name french or german towns and
villages).

  1. I had several similar bugs (mismatched tag, invalid token) when importing

data produced by an external source and converted to XML. This was more or less
normal :
let us say a 'feature', not a 'bug'... :-) (& < > in the text, etc)

  1. but, in this very situation, the slash was accepted by mediawiki and was

exported. However, we need that an XML file exported, and then untouched, would be
reimported without problem.
So, in this very situation, I think it should be considered as a bug.

Hope this helps...

marc


Version: 1.5.x
Severity: normal

Details

Reference
bz3159

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:46 PM
bzimport set Reference to bz3159.
bzimport added a subscriber: Unknown Object (MLST).

bugzilla.wikimedia wrote:

the XML file generated by export but producing an error on import

attachment han-sur-lesse.xml ignored as obsolete

bugzilla.wikimedia wrote:

Comment on attachment 788
the XML file generated by export but producing an error on import

<parsererror xmlns="http://www.mozilla.org/newlayout/xml/parsererror.xml">Erreur d'analyse XML : balise ne correspondant pas. Attendu : &lt;/base&gt;.
Emplacement : http://bugzilla.wikimedia.org/attachment.cgi?id=788&amp;action=view
Numéro de ligne 31, Colonne 3 :<sourcetext>&lt;/siteinfo&gt;
--^</sourcetext></parsererror>

bugzilla.wikimedia wrote:

the XML file generated by export but producing an error on import (and on XML parsing) uploaded as a text/plain

Attached:

Your file is missing the close tag on the <base> element. I cannot reproduce this locally; I'm guessing
you're saving the file from a web browser using a "save web page as local archive" mode of some kind
which attempts to rewrite HTML, and it's corrupting the file. (HTML has a <base> element which cannot
contain content, so the close tag might be removed by such a process.)

Try saving the file intact instead of as a corrupt web archive, and see if that helps.