[wp-trac] [WordPress Trac] #62417: Excerpts don't include content from list-item blocks.

WordPress Trac noreply at wordpress.org
Thu Nov 14 07:37:33 UTC 2024


#62417: Excerpts don't include content from list-item blocks.
-------------------------------------------------+-------------------------
 Reporter:  dougwollison                         |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Formatting                           |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots has-       |     Focuses:
  testing-info                                   |
-------------------------------------------------+-------------------------
Changes (by abcd95):

 * keywords:  has-patch => has-patch has-screenshots has-testing-info


Comment:

 I've successfully reproduced the issue and tested the patch. Here's my
 verification:

 Steps to Reproduce Used:
 1. Created a test post with this structure:
    - Paragraph block with text "Before the list"
    - List block with items:
      • First item in list
      • Second item in list
      • Third item with some detailed text
    - Paragraph block with text "After the list"

 2. Before Patch:
    - Checked excerpt in post listing
    - Only paragraph content appeared ("Before the list. After the list.")
    - All list content was missing from excerpt

 3. After Applying Patch:
    - Added 'core/list-item' to $allowed_inner_blocks
    - Checked excerpt again
    - Full content appears correctly including list items


 This confirms that:
 1. The issue is resolved by including core/list-item block
 2. Excerpts now maintain proper content flow
 3. No regression in other block content handling


 Before applying the patch - [[Image(https://postimg.cc/n9K6vTYn)]]
 After applying the patch - [[Image(https://postimg.cc/H8xTsq1f)]]

 ✅ The patch successfully fixes the excerpt generation for list content
 while maintaining expected excerpt behavior for other blocks. 👍

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


More information about the wp-trac mailing list