Opened 3 years ago
Closed 3 years ago
#53604 closed defect (bug) (fixed)
Excerpts don't handle `innerBlocks` for groups and nested columns properly
Reported by: | aristath | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Posts, Post Types | Keywords: | has-patch has-unit-tests commit fixed-major dev-reviewed |
Focuses: | Cc: |
Description (last modified by )
See https://github.com/WordPress/gutenberg/issues/33154 for details.
When generating a post excerpt, we run the content through
excerpt_remove_blocks
. That function doesn't currently handle innerBlocks
for groups properly, as well as deeply-nested columns, resulting in empty excerpts.
Change History (23)
#1
@
3 years ago
- Description modified (diff)
- Keywords has-patch added
- Summary changed from Excerpt block doesn't render group block innerBlocks to Excerpt block doesn't handle innerBlocks for groups and nested columns
#2
@
3 years ago
- Summary changed from Excerpt block doesn't handle innerBlocks for groups and nested columns to Excerpts don't handle `innerBlocks` for groups and nested columns properly
- Version set to trunk
#4
@
3 years ago
- Keywords needs-unit-tests removed
Added some feedback on the PR.
Feedback addressed
It would also be nice to get some unit tests added here.
Tests added :)
#5
@
3 years ago
- Component changed from General to Formatting
- Keywords needs-unit-tests added
- Milestone changed from 5.9 to 5.8
Thanks @aristath!
Just to pull in some context here, @aristath mentioned on the PR that it's desired to have this in 5.8.
Moving to 5.8 to consider.
#8
@
3 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 51348:
#9
@
3 years ago
- Keywords has-unit-tests commit dev-feedback fixed-major added; needs-unit-tests removed
Reopening for backport consideration.
#10
@
3 years ago
@desrosj brought up in the code review including a filter and I feel like this is the right move. I don't think we should wait for 5.9 as it is going to make it more difficult for people that build custom blocks if we don't have it now.
#11
@
3 years ago
@aristath would you be able to create a follow up PR adding a filter? I'll wait to backport until after the filter is in.
This ticket was mentioned in PR #1479 on WordPress/wordpress-develop by aristath.
3 years ago
#12
Adds an excerpt_allowed_wrapper_blocks
filter.
Trac ticket: https://core.trac.wordpress.org/ticket/53604
#13
@
3 years ago
@aristath would you be able to create a follow up PR adding a filter? I'll wait to backport until after the filter is in.
Of course. Filter added in https://github.com/WordPress/wordpress-develop/pull/1479
#14
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Never actually reopened this one. Reviewing the filter patch now.
3 years ago
#17
Merged into Core in https://core.trac.wordpress.org/changeset/51375.
#18
@
3 years ago
There's a "warppers" typo in the filter description, looks good to backport otherwise.
Added some feedback on the PR.
It would also be nice to get some unit tests added here.