Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#58195 new defect (bug)

WordPress Exporter includes trashed posts when the author filter is enabled

Reported by: shtv's profile shtv Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Export Keywords:
Focuses: Cc:

Description

The wordpress exporter has a bug where it will export all posts except trashed posts when using the default options but will export all posts including trashed posts when the author filter is enabled (to export posts by a specific author). Exporting by a specific user is the only way to export a specific portion of the posts and avoid exporting all of files.

This is a problem because 99% of people do not want trashed items to be in included in an export file as these are already designated as unwanted/ unnecessary. The exporter function does not make it obvious to users that it will include trashed items in the created export file. This problem is only obvious if someone tries to incorporate the exported posts into another site which already has posts of a similar name.

You might ask how is it possible to have duplicate posts (1 post published, 1 post trashed with exactly the same name) You couuld get this by accidentally creating two posts with exactly the same slug or by deleting a post and creating a new one with exactly the same name.

After importing the xml file into another site WordPress gives a warning that the imported post already exists but does not make it clear that the new duplicate is actually located in the trash section of the new site and is not published like a normal post.

With this unexpected behaviour and confusing warning message users will not necessarily understand how to solve the issue and this warning message witll continue to pop up EVERYTIME they export/import posts because the site of origin will continue to include all trash files in the exported xml until the user empties their trash or the trash files expire.

Some users like myself use the export function multiple times a day and export 100s of posts a week. Correcting this "bug" would avoid confusion, save time and would ensure the behaviour of the exporter matches the expectations of the user.

Change History (1)

#1 @SergeyBiryukov
12 months ago

  • Summary changed from WordPress Exporter bug to WordPress Exporter includes trashed posts when the author filter is enabled
Note: See TracTickets for help on using tickets.