-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Block] Post ExcerptAffects the Post Excerpt BlockAffects the Post Excerpt Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When a block theme is active, the post excerpt block prints code, not a summary of the post content, in the editor.
On the front, the markup for the block is printed as expected, except, the block is empty.
I have not been able to reproduce this with classic themes. I recommend further testing, I did not test in the template editor or site editor.
Step-by-step reproduction instructions
- Activate a block theme like TT1 blocks or Empty Theme.
- Create a new post and add some content to it
- Add a post excerpt block.
- See that the post excerpt block prints the CSS. This step is not always reproduceable, sometimes, the page first needs to be reloaded for the code to display.
- Save and view the front. Check both the single post and an archive page that includes the post.
- Confirm that the block is empty on the front.
Expected behaviour
I expect an excerpt to be displayed.
Actual behaviour
The post excerpt block prints the CSS.
Screenshots or screen recording (optional)
Code snippet (optional)
There are no JS errors in the console in the editor, but this is the markup for the post excerpt block, note the CSS after the "Sample paragraph inside group block"
<div class="block-editor-block-list__block wp-block wp-block-post-excerpt" id="block-3c1f8bf5-de86-4970-ad47-1d10844faf1b" tabindex="0" role="group" aria-label="Block: Post Excerpt" data-block="3c1f8bf5-de86-4970-ad47-1d10844faf1b" data-type="core/post-excerpt" data-title="Post Excerpt"><div role="textbox" aria-multiline="true" aria-label="Post excerpt text" class="block-editor-rich-text__editable rich-text" contenteditable="true" style="white-space: pre-wrap; min-width: 1px;">
Sample paragraph inside group block. .wp-container-60de8a565cc8e > * {max-width: 610px;margin-left: auto !important;margin-right: auto !important;}.wp-container-60de8a565cc8e > .alignwide { max-width: 1240px;}.wp-container-60de8a565cc8e .alignfull { max-width: none; }.wp-container-60de8a565cc8e .alignleft { float: left; margin-right: 2em; }.wp-container-60de8a565cc8e .alignright { float: right; margin-left: 2em; }
</div><p class="wp-block-post-excerpt__more-text"><a role="textbox" aria-multiline="true" aria-label=""Read more" link text" class="block-editor-rich-text__editable wp-block-post-excerpt__more-link rich-text" contenteditable="true" style="white-space: pre-wrap; min-width: 1px;"><span data-rich-text-placeholder="Add "read more" link text" contenteditable="false" style="pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;"></span></a></p></div>
Resulting markup on the front:
<div class="wp-container-60de8b64dfbef entry-content wp-block-post-content"><div class="wp-block-post-excerpt"><p class="wp-block-post-excerpt__excerpt"></p><p class="wp-block-post-excerpt__more-text"></p></div>
<div class="wp-container-60de8b64dfb0b wp-block-group">
<p class="has-text-align-center has-white-background-color has-background">Sample paragraph inside group block.</p>
</div>
<style>.wp-container-60de8b64dfb0b > * {max-width: 610px;margin-left: auto !important;margin-right: auto !important;}.wp-container-60de8b64dfb0b > .alignwide { max-width: 1240px;}.wp-container-60de8b64dfb0b .alignfull { max-width: none; }.wp-container-60de8b64dfb0b .alignleft { float: left; margin-right: 2em; }.wp-container-60de8b64dfb0b .alignright { float: right; margin-left: 2em; }</style>
<p></p>
</div>
WordPress information
- WordPress version: 5.7.2. -Not tested with 5.8 RC
- Gutenberg version: 10.9.1 and current trunk
- Are all plugins except Gutenberg deactivated? Yes
- Are you using a default theme (e.g. Twenty Twenty-One)? TT1 blocks, empty theme
Device information
- Device: Desktop
- Operating system: Windows 10
- Browser: Chrome 91.0.4472.124
Metadata
Metadata
Assignees
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Block] Post ExcerptAffects the Post Excerpt BlockAffects the Post Excerpt Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
