Skip to content

when element is a revision, query the content block element revisions too - #18161

Merged
brandonkelly merged 3 commits into
5.xfrom
bugfix/18149-content-block-revisions
Dec 10, 2025
Merged

brandonkelly merged 3 commits into
5.xfrom
bugfix/18149-content-block-revisions

Conversation

@i-just

@i-just i-just commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

Description

If you have a Content Block field that’s inside of a Matrix field in the inline-editable blocks view mode and there are at least two “blocks” in that Matrix field, the Content Block elements are not retrieved correctly.

Steps to reproduce:

  • clean 5.8.21 install with one site
  • create a content block field myContentBlock with a plain text field in it plainText
  • create a matrix field myMatrix with entry type withContentBlock, add myContentBlock field to it; view mode: inline-editable blocks; revisions: can be on or off - same results in both cases
  • create a section mySection with entry type myEntryType, add myMatrix field to it (all default settings)
  • create an entry in mySection, fill out the title, add two blocks to myMatrix, fill out the plainText field and fully save
  • edit the first block, change the plainText field value and fully save
  • view the first revision from the top - the plainText field in both blocks shows as empty

Fix: when the element is a revision, query for content block revisions.

Related issues

#18149

@i-just
i-just requested a review from brandonkelly December 10, 2025 10:27
@brandonkelly
brandonkelly merged commit 72d678d into 5.x Dec 10, 2025
2 checks passed
@brandonkelly
brandonkelly deleted the bugfix/18149-content-block-revisions branch December 10, 2025 22:31
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.

2 participants