Skip to content

Conversation

@kjac
Copy link
Contributor

@kjac kjac commented Nov 3, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #20454

Description

In V13, the RTE would allow for rendering fallback values. In V15+, after the introduction of blocks in the RTE, this is no longer the case.

See the linked issue for a detailed description and steps to reproduce + test.

Note that I have only been able to reproduce the issue for variant documents.

Also note that I have chosen to make an empty paragraph tag count as "no value" - this is what the RTE stores in the markup property when the editor removes all content from the RTE.

@kjac kjac marked this pull request as draft November 3, 2025 13:48
@kjac kjac marked this pull request as ready for review November 3, 2025 13:59
@kjac kjac changed the title Make the RTE treat an "empty" value as a non-value Make the RTE treat an "empty" value as a non-value (closes #20454) Nov 3, 2025
Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've tested the fix and can see the problem resolved. You mentioned that you couldn't see this problem for invariant content which was odd, as I could, but it's resolved by these updates. Just for verification I extended the tests you had written to handle both invariant and variant content.

@AndyButland AndyButland changed the title Make the RTE treat an "empty" value as a non-value (closes #20454) Rich text editor: Treat an "empty" value as a non-value (closes #20454) Nov 3, 2025
@AndyButland AndyButland enabled auto-merge (squash) November 3, 2025 14:48
@AndyButland AndyButland merged commit a4d893a into release/17.0 Nov 3, 2025
21 of 22 checks passed
@AndyButland AndyButland deleted the v17/bugfix/rte-with-fallback-value branch November 3, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants