[wp-trac] [WordPress Trac] #17379: Filtered exports drop attachments and featured images

WordPress Trac noreply at wordpress.org
Wed Feb 21 17:15:13 UTC 2024


#17379: Filtered exports drop attachments and featured images
-------------------------------------------------+-------------------------
 Reporter:  billseymour                          |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  6.5
Component:  Export                               |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests has-        |     Focuses:
  testing-info commit                            |
-------------------------------------------------+-------------------------

Comment (by hellofromTonya):

 = Test Report

 === Description
 This report validates that the patch works as expected.

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/5720
 current version as of this test report.

 === Environment
 - WordPress: 6.5-beta1-57630-src
 - PHP: 7.4.33
 - Server: nginx/1.23.4
 - Database: server: mysqli 8.0.36 | client: mysqlnd 7.4.33
 - Browser: Firefox 122.0.1
 - OS: macOS
 - Theme: TT4
 - MU Plugins: None
 - Plugins: None

 === Steps

 Note: All images I used were different, i.e. only used once.

 ==== Set up:
 1. Add at least one author or higher user. I added tester1 (author) and
 tester2 (editor).
 2. Add multiple new posts. I added:
    * Post 1 by tester1 with a featured image and an image within the
 content.
    * Post 2 by tester2 with a featured image.
    * Post 3 by tester2 with an image in the content but no featured image.
 2. Add multiple new pages. I added:
    * Page 1 by tester1 with a featured image and a different image within
 the content.
    * Page 2 by tester2 with a featured image.
    * Page 3 by tester2 with an image in the content but no featured image.

 ==== Test Posts with a specific author
 1. Go to Tools > Export
 2. Select Posts.
 3. In Posts > Authors, select a specific author. I selected `tester2`.
 4. Select the "Download Export File" button.
 5. Open and review the downloaded XML file.

 ==== Test Posts (without a specific author)
 1. Go to Tools > Export
 2. Select Posts. Do not select a specific author.
 3. Select the "Download Export File" button.
 4. Open and review the downloaded XML file.

 ==== Test Pages with a specific author
 1. Go to Tools > Export
 2. Select Pages.
 3. In Posts > Authors, select a specific author. I selected `tester2`.
 4. Select the "Download Export File" button.
 5. Open and review the downloaded XML file.

 ==== Test Pages (without a specific author)
 1. Go to Tools > Export
 2. Select Pages. Do not select a specific author.
 3. Select the "Download Export File" button.
 4. Open and review the downloaded XML file.

 === Expected Results

 The following expected results are based on my set up.

 ==== Test Posts with a specific author
 Should be an item for each post and an item for each post's featured
 image.

 I selected `tester2`, who in my set up has 2 posts (Post 2 and 3) and 1
 featured image (attached to Post 2). Thus, the expected XML download
 should have 3 items.

 ==== Test Posts (without a specific author)
 Should be an item for each post (to include all posts) and an item for
 each post's featured image.

 My set up has 3 posts (Post 1, Post 2, Post 3) and 2 featured images;
 thus, the expected XML download should have 5 items.

 ==== Test Pages with a specific author
 See posts (above) - expect the same result, but for pages.

 ==== Test Pages (without a specific author)
 See posts (above) - expect the same result, but for pages.

 === Test Results: before the patch

 Test Posts with a specific author: downloaded XML items:
 - ❌ No item for Post 2's featured image 🐞
 - ✅ Item for Post 2
 - ✅ Item for Post 3

 Test Posts (without a specific author): the downloaded XML items:
 - ❌ No item for Post 1's featured image 🐞
 - ❌ No item for Post 2's featured image 🐞
 - ✅ Item for Post 1
 - ✅ Item for Post 2
 - ✅ Item for Post 3

 Test Pages with a specific author: downloaded XML items:
 - ❌ No item for Page 2's featured image 🐞
 - ✅ Item for Page 2
 - ✅ Item for Page 3

 Test Pages (without a specific author): the downloaded XML items:
 - ❌ No item for Page 1's featured image 🐞
 - ❌ No item for Page 2's featured image 🐞
 - ✅ Item for Page 1
 - ✅ Item for Page 2
 - ✅ Item for Page 3

 === Test Results: after the patch

 Confirmed the patch resolves the issue of including the featured image.

 Test Posts with a specific author: downloaded XML items:
 - ✅ Item for Post 2's featured image
 - ✅ Item for Post 2
 - ✅ Item for Post 3

 Test Posts (without a specific author): the downloaded XML items:
 - ✅ Item for Post 1's featured image
 - ✅ Item for Post 2's featured image
 - ✅ Item for Post 1
 - ✅ Item for Post 2
 - ✅ Item for Post 3

 Test Pages with a specific author: downloaded XML items:
 - ✅ Item for Page 2's featured image
 - ✅ Item for Page 2
 - ✅ Item for Page 3

 Test Pages (without a specific author): the downloaded XML items:
 - ✅ Item for Page 1's featured image
 - ✅ Item for Page 2's featured image
 - ✅ Item for Page 1
 - ✅ Item for Page 2
 - ✅ Item for Page 3

 === Additional Notes

 Images/attachments within the content were not included when selecting
 Posts or Pages, but are included when selecting All content.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/17379#comment:57>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list