4

I've just installed FB 8 onto CentOS, which was easy, and am now trying to import from our existing Bugzilla 3.6.2. Unfortunately the script is failing to parse the XML it fetches from Bugzilla, apparently due to an issue with the DTD:

Importing Bug: 1...
An XML parser error was encountered. This cannot be handled by an import script. You will need to make changes to your source data to rectify this. Message text: "an attribute value was not quoted http://bugzilla.XXXXX.com/bugzilla.dtd Line 86, position 12."
Importing Bug: 2...
An XML parser error was encountered. This cannot be handled by an import script. You will need to make changes to your source data to rectify this. Message text: "an attribute value was not quoted http://bugzilla.XXXXX.com/bugzilla.dtd Line 86, position 12."
Importing Bug: 3...

I've used XML quite a bit but have never had to look at DTDs before. I think there may be a real issue with the DTD -- starting from line 83 it reads:


          name CDATA #REQUIRED
          id CDATA #REQUIRED
          type_id CDATA
          status CDATA #REQUIRED
          setter CDATA #IMPLIED
          requestee CDATA #IMPLIED

My hypothesis is that there needs to be a keyword '#REQUIRED' or '#IMPLIED' at the end of the third line there.

I realize that (a) the importer script is not supported, and (b) this appears to be a bug in Bugzilla, not FB, but I'm asking here in case some good Samaritan has an answer. And also so that anyone else running into this in the future can find this question and, hopefully, the fix. Thanks!

Update: I found this bug report somewhere that also implies that it's an error in Bugzilla. I will ask our BZ admin to edit the DTD file and see if that works...

flag

2 Answers

3

The Bugzilla folks apparently don't know about this bug yet. I filed a bug report on it.

Here's the patch we've made locally to the bugzilla.dtd file:

--- /tmp/textmate stdin 4Nd1HX.txt  2010-11-15 10:47:57.000000000 -0800
+++ /tmp/textmate stdin jrKzBC.txt  2010-11-15 11:55:20.000000000 -0800
@@ -69,7 +69,6 @@
 >
 <!ELEMENT attachid (#PCDATA)>
 <!ELEMENT date (#PCDATA)>
-<!ELEMENT delta_ts (#PCDATA)>
 <!ELEMENT desc (#PCDATA)>
 <!ELEMENT filename (#PCDATA)>
 <!ELEMENT type (#PCDATA)>
@@ -82,7 +81,7 @@
 <!ATTLIST flag
           name CDATA #REQUIRED
           id CDATA #REQUIRED
-          type_id CDATA
+          type_id CDATA #IMPLIED
           status CDATA #REQUIRED
           setter CDATA #IMPLIED
           requestee CDATA #IMPLIED
link|flag
Thanks for posting this, Jens. – Rob Sobers Nov 16 2010 at 15:59
1

BTW, if you're getting different XML parse errors on every bug, for example complaining about a 'link' element expected at line 125, what's likely happening is that the Bugzilla username/password you entered don't work, so Bugzilla is returning an HTML error page, which the importer is trying to parse as XML. Solution: double-check the credentials you gave the importer.

link|flag
Yup, I've seen this one before. Bugzilla should return authentication errors in XML, not HTML. – Rob Sobers Nov 16 2010 at 15:59

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.