Closed Bug 521184 Opened 17 years ago Closed 17 years ago

importxml.pl only imports one bug

Categories

(Bugzilla :: Bug Import/Export & Moving, defect)

3.4.2
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ahand, Unassigned)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.24 Safari/532.0 Build Identifier: 3.4.2 When running importxml.pl from the command line it successfully imports the first bug in the input XML file and then stops. No error message is recorded. However the input XML has hundreds of bugs in it. Reproducible: Always Steps to Reproduce: 1. run command line: importxml.pl -v -m bugs.xml 2. 3. Actual Results: First bug in the XML is properly imported (status message with OK is displayed) -- processing stops after the first bug with no error message Expected Results: All of the bugs in the XML should have be imported XML file passes DTD validation
Version: unspecified → 3.4.2
I cannot reproduce the problem with an XML file containing 34 bugs. They are all imported correctly. Tested on both Bugzilla 3.4.2 and 3.5. Maybe is your XML file corrupted or incomplete.
Severity: major → normal
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
The XML file was generated by xml.cgi. Shouldn't importxml.pl complain about a corrupted or incomplete XML file? Can you attach the XML file you used so I can try it on my installation?
(In reply to comment #3) > The XML file was generated by xml.cgi. Shouldn't importxml.pl complain about a > corrupted or incomplete XML file? Yes, it really should, but we haven't gotten that far yet. ;) If it was generated by xml.cgi it must be fairly old. I thought xml.cgi went away around 2.22 or so.
one other thing to try is increasing the verbosity on the output with -v -v
What is the preferred method for generating a valid XML file to be imported, then? When I tried and opened Bug 521311 I did use -v -v, but it still indicated a successful import.
does your xml contain multiple <bug></bug> tags inside a <bugzilla></bugzilla> tag? If so, you should be good.
Yes, it does. I can send you my XML file for private viewing (and/or testing) if you'd like. If that is all that is needed for importxml.pl to do its job, then something isn't right here.
I tried this again with a short list of bugs in an XML that was generated by show_bug.cgi after clicking on the "XML" button on a bug list generated by buglist.cgi. The same problem happened -- only the first bug was imported. I added some instrumentation to the importxml.pl script to see where it was failing -- it appears the first call to process_bug completes successfully (I was able to see my debug trace statements after the final call to $twig->purge). However, I never got a second callback for the second <bug> element in the XML. Furthermore, I added a trace statement immediately after the $twig->parse($xml) call and it never got there. It appears that the script is unexpectedly exiting during the XML parsing (but there are no errors displayed). Any thoughts?
Can you post a patch to inputxml.pl so I can see if I see the same thing as you? My other thought is to re-open the bug. I'm sure there are more people than just us 2 that are seeing this. Like this guy: http://groups.google.com/group/mozilla.support.bugzilla/browse_thread/thread/dabea5465a921147
Here is the instrumented version of the importxml.pl -- all I did was add some extra PRINT statements to see where the script was failing. Give this a shot and let's see if yours is dying in the same place. The last debug statement I get is "after twig purge" -- I never see the one that reads "done parsing"
Thanks. I see the same thing. Last line reads "after twig purge".
Perhaps this is an issue in one of the dependent Perl modules? I tried updating the XML::Twig module (using cpan install XML::Twig), but it was already up to date. Any other modules that I should try updating? Frédéric, can you attach your "working" XML file so we can test it in our environment and confirm or deny if the issue is environmental. Thanks!
It is possible that there has been a change to the Twig module that is causing this. Try commenting out the purge statement and see what happens.
I tried commenting out the purge statement and got the same results :-( Any other thoughts?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: