#4028 closed defect (bug) (fixed)
Importing WXR breaks serialized postmeta value
Reported by: | takayukister | Owned by: | |
---|---|---|---|
Milestone: | 2.2 | Priority: | low |
Severity: | normal | Version: | 2.2 |
Component: | Administration | Keywords: | import has-patch WXR |
Focuses: | Cc: |
Description
When importing WordPress eXtended RSS (WXR), every element content get escaped by addslashes() in get_tag(). This is good for usual string. But when the content is serialized string like postmeta values, this breaks the serialized format and make WordPress disable to unserialize them.
Attachments (2)
Change History (12)
#3
@
17 years ago
Actually, nothing passed to add_post_meta should be escaped. Unlike most other functions, add_post_meta does it's own escaping. I think we just need to stripslashes() all postmeta values before handing off to add_post_meta.
#5
@
15 years ago
- Cc JonathanRogers added
- Resolution fixed deleted
- Status changed from closed to reopened
- Version changed from 2.2 to 2.8.3
Unfortunately, this bug seems to have been re-introduced by Ticket #7347. Now, serialized post meta values are doubly serialized after importing. Since Ticket #7347 indicates there might be some reason for maybe_serialize() to doubly serialize (though I can't fathom what it might be) and add_post_meta() calls maybe_serialize(), I'm not sure where this should be fixed.
#6
@
15 years ago
- Resolution set to fixed
- Status changed from reopened to closed
- Version changed from 2.8.3 to 2.2
I think this would be better off in a new ticket JonathanRogers.
I'm going to reclose this, Could you open a new ticket related to it in the current version?
This ticket was mentioned in PR #5571 on WordPress/wordpress-develop by noahtallen.
11 months ago
#8
noahtallen commented on PR #5571:
11 months ago
#9
Some of the Gutenberg failures above are because it's not yet on version 20 either.
noahtallen commented on PR #5571:
8 months ago
#10
Done elsewhere :)
I wrote a patch whitch try to unserialize.