#21960 closed defect (bug) (fixed)
Exporter doesn't exclude auto-drafts when calculating the authors list
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Export | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
The exported correctly excludes auto-drafts from the file but not when calculating the list of authors on the blog.
This means the export file can have a list of authors which doesn't match those on the blog and can include users that might not be expected when the WordPress install has multisite enabled as auto-drafts can get created for Super Admins on other users blogs.
Attachments (2)
Change History (6)
I wrote some tests for this (attached) but we can really use them at the moment because these functions are defined inside export_wp and that throws headers already sent errors and phpunit marks the test as having errors.
Ideally we should make these functions more globally available - the export includes are only included when we load export.php anyway.
Replying to westi:
I wrote some tests for this (attached) but we can really use them at the moment because these functions are defined inside export_wp and that throws headers already sent errors and phpunit marks the test as having errors.
Ideally we should make these functions more globally available - the export includes are only included when we load export.php anyway.
Yep, they should just be pulled into export.php. Defining functions inside functions is a pretty silly endeavor.
- Owner set to westi
- Resolution set to fixed
- Status changed from new to closed
In [21946]:
comment:4
johnbillion — 6 months ago
Further enhancement to this: #20206 (albeit an older ticket)

Simple patch to fix this issue