Skip to content

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Aug 11, 2025

Description

Similar to #17470, in some cases, the lazy eager loading for the nested matrix cards was only finding elements owned by the first nested entry. I tried a few other solutions, but those that made it work as expected resulted in the same number of queries as with eagerly() removed.

Steps to reproduce:

  1. clean 5.8.13.2 installation
  2. create a matrix field in cards mode (matrixCards), all default settings; with an entry type that can contain just the default title field (forMatrixCards)
  3. create a matrix field in blocks mode (matrixBlocks), all default settings; with an entry type that contains the default title field and the matrixCards field; the matrixCards field needs to be mandatory
  4. create a section (blog) with an entry type (article) that contains the default title field and the matrixBlocks field
  5. create an entry in the blog section; fill out the title, add 2 blocks to the matrixBlocks field, fill out the title for both blocks and add at least one matrixCards nested entry to each; fully save
  6. edit the blog entry from the previous step; remove the title from the first matrixBlock block, wait for autosave to complete and then try to fully save; when the page reloads the second matrixBlocks block will be empty; if you reload the page, the nested entries for that second block are back

Related issues

n/a - reported by @olivierbon

@i-just i-just requested a review from brandonkelly August 11, 2025 11:33
@brandonkelly brandonkelly merged commit 6567a16 into 5.x Aug 13, 2025
2 checks passed
@brandonkelly brandonkelly deleted the bugfix/eagerly-matrix-cards-and-validation branch August 13, 2025 01:26
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