Skip to content

Content before the More button is truncated and unavailable if it's too long and if the excerpt is hidden on full page #44062

Open
@Ryokuhi

Description

Description

When the More block is added to a post, only the content before it should appear on the archives page. This is true only if the content before the More block isn't too long: if it's long enough, it's instead truncated and only the beginning of it appears on the archive page (possibly, together with the "Read more link text" that can be set in the editor).

The problem is that, when one selects the option of the More block to "Hide the excerpt on the full content page", the truncated part of the content before the More block itself doesn't show anywhere in the front end.

I'm not sure what the expected behavior in this situation should be: either everything before the More block should appear on the archive page, independently of its length, or the truncated content should appear on the full content page, which can be complicated as the content can be truncated even in the middle of a sentence.
I tend to think that the expected behavior should be the former, as it would respect the choice of the content creator.

Step-by-step reproduction instructions

  1. Install WordPress. The Gutenberg plugin is not needed, but installing it makes no difference.
  2. Create a new post. The post should contain three blocks.
    • A Paragraph block containing enough content for it to be truncated on the homepage.
    • A More block, with the "Hide the excerpt on the full content page" toggle active (the option is in the sidebar).
    • Another Paragraph block.
  3. Visit the full content page and check that only the Paragraph block after the More block is on display.
  4. Visit the homepage of the website and check that the content before the More block is truncated. The truncated content is available nowhere on the website.

Screenshots, screen recording, code snippet

Here is a possible post that allows reproducing the bug.
A test post with three blocks in the editor: a long Paragraph block, a More block, and another Paragraph block.

This is the full content page: only content after the More block is displayed.
The same post of the previous image, shown on the frontend.

This is the homepage: the content before the More block is truncated and what follows appears nowhere.
The homepage of the website, with the beginning of the post truncated.

Environment info

  • WordPress 6.0.2.
  • Tested both without Gutenberg and with Gutenberg 14.0.2.
  • Reproduced both with Twenty Twenty-Two and Twenty Twenty-One themes. The bug doesn't appear in Twenty Twenty, possibly because this theme doesn't show excerpts, not even when they are explicitly added to a post.
  • Browsers: Chrome 105.0.5195.102, Edge 105.0.1343.33, Firefox 104.0.2, Firefox Developer 105.0b9, Opera 90.0.4480.84.
  • Laptop with Windows 10 Home.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Assignees

No one assigned

    Labels

    [Block] MoreAffects the More Block - used for displaying the 'Read More' link[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions