Opened 5 years ago
Closed 4 years ago
#7624 closed defect (bug) (fixed)
Export blog feature produces invalid XML file
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 2.7 |
| Component: | Export | Version: | 2.6.1 |
| Severity: | major | Keywords: | has-patch commit dev-feedback |
| Cc: |
Description
The WXR output is not valid XML. Using minidom in Python (which uses Expat) to read the file can produce an error like this:
xml.parsers.expat.ExpatError: unbound prefix: line 90, column 0
Looking at the line in question, we see something like this:
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
The excerpt namespace is not defined. We need to add something like this to the rss attributes near the top of the file:
xmlns:excerpt="http://wordpress.org/excerpt"
or some similar URL.
Attachments (1)
Change History (9)
- Priority changed from normal to high
- Severity changed from normal to major
- Version changed from 2.5.1 to 2.6.1
comment:2
byrnereese — 5 years ago
I have successfully reproduced this bug on 2.6.2 and WordPress.com on the date the note was made. Attached is a patch to fix this issue.
- Keywords has-patch dev-feedback added
As well as defining the namespace, A file needs to exist at the URL which describes the except namespace. Not something most people understand how to create..
DD32, only if you're using a validating parser. Quite rare.
The rest of the namespaces don't have files anyways.
comment:6
jacobsantos — 5 years ago
- Keywords commit added
comment:7
jacobsantos — 4 years ago
Why hasn't this been committed?

I can confirm that this also triggers errors in Firefox 3 and xml star, and prevents successful importation into Movable Type. I exported from WP 2.6 and 2.6.1.