#20375 closed defect (bug) (duplicate)
Attachments aren't exported when selecting a Custom Post Type on export
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Export | Keywords: | needs-patch |
Focuses: | Cc: |
Description
When i'm exporting my full website including the custom post type's, all the data is exported correctly including thumbnails. In my XML i get the following lines:
<wp:postmeta> <wp:meta_key>_thumbnail_id</wp:meta_key> <wp:meta_value><![CDATA[855]]></wp:meta_value> </wp:postmeta>
And when searching for this ID, i can find an attachment with ID 855 like the following:
<wp:post_id>855</wp:post_id> <wp:post_date>2011-11-24 19:49:23</wp:post_date> <wp:post_date_gmt>2011-11-24 17:49:23</wp:post_date_gmt> <wp:comment_status>open</wp:comment_status> <wp:ping_status>open</wp:ping_status> <wp:post_name>wco-6</wp:post_name> <wp:status>inherit</wp:status> <wp:post_parent>43</wp:post_parent> <wp:menu_order>0</wp:menu_order> <wp:post_type>attachment</wp:post_type>
When i'm selecting to only export my custom post type, i can see the block that's defining the _thumbnail_id, but i can't find the attachment data for that ID. I've already searched in the wp-admin/includes/export.php file, but i can't find where the bug is.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Duplicate of #17379.
Yep, it sucks. The solution is probably to do something like looking through the list of posts to export and then also grab any posts/attachments that have any of those as a parent.