#46575 closed defect (bug) (fixed)
Issue with WP Export - adding spaces to .xml file
Reported by: | juliarrr | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Export | Keywords: | has-patch |
Focuses: | Cc: |
Description
Hello,
After updating WordPress to 5.1 (or 5.1.1) appeared bug with exporting content. When proceeding to the Tools - Export and downloading export .xml file, it can be seen that it exports content incorrectly. Spaces before and after content are added, and it causes problems with importing this content afterwhile. On the screenshot you can see the difference - content on the left was exported on WP 5.0 and content on the right was exported on WP 5.1: https://www.screencast.com/t/jovdKo4Cw . As you can see there are unneeded spaces that break the content structure after import.
Please fix this problem in the next WP update.
Thank you!
Attachments (1)
Change History (11)
#3
@
6 years ago
- Component changed from General to Export
Just to add to this, this is not limited to <title>
elements. As mentioned on https://core.trac.wordpress.org/ticket/46656 the coding-standards fixes in https://core.trac.wordpress.org/changeset?old_path=%2Ftags%2F5.0.3%2Fsrc%2Fwp-admin%2Fincludes%2Fexport.php&old=45013&new_path=%2Ftags%2F5.1.1%2Fsrc%2Fwp-admin%2Fincludes%2Fexport.php&new=45013&sfp_email=&sfph_mail=#file0 result in a lot of whitespace that breaks things on imports - both for menu items as well as content using any page-builder.
It's really annoying having to manually edit the exported XMLs to remove whitespace before importing them on another site - and I'm sure not everyone can do that.
#6
@
6 years ago
46575.diff is not enough, running composer format
on src/wp-admin/includes/export.php
still results in the extra tabs.
Apparently this needs to be adjusted upstream in WPCS: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.
Remove blank