You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[5.2.0-beta.3]: Exception thrown when creating a new entry in a Cards Matrix field nested in an inline-editable Matrix field, inside a global set
#15160
Closed
mmikkel opened this issue
Jun 6, 2024
· 2 comments
If a Matrix field using the "Cards" view mode is nested inside another Matrix field using the "As inline-editable blocks" view mode, and the inline-editable field is added to a global set, attempting to create a new entry in the inner "Cards" field will cause a server-side exception:
As far as I can tell, this only happens when a "Cards" Matrix field is nested inside an inline-editable field, and only in global sets.
If both Matrix fields are either using the "Cards" or the inline-editable view mode, it's fine.
If the global set is saved in-between creating the outer (inline-editable) nested entry and the inner (cards) nested entry, the exception is not thrown.
I'm not able to reproduce the issue on 5.1.9.
Steps to reproduce
Add a Matrix field using the "Cards" view mode to an entry type used in a Matrix field using the "As inline-editable blocks" view mode
Add the inline-editable Matrix field to a global set
While editing the global set, create a new entry in the outer, inline-editable Matrix field. Then, create a new entry in the inner, "Cards" Matrix field in the nested entry that was just created
Expected behavior
Actual behavior
Craft CMS version
5.2.0-beta.3
PHP version
8.2.18
Operating system and version
DDEV v1.23.1
Database type and version
10.11.6-MariaDB (also tested on MySQL 8)
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered:
What happened?
Description
If a Matrix field using the "Cards" view mode is nested inside another Matrix field using the "As inline-editable blocks" view mode, and the inline-editable field is added to a global set, attempting to create a new entry in the inner "Cards" field will cause a server-side exception:
CleanShot.2024-06-06.at.22.41.04.mp4
Here's a stack trace for the error: https://pastebin.com/L7mUDEkw
As far as I can tell, this only happens when a "Cards" Matrix field is nested inside an inline-editable field, and only in global sets.
If both Matrix fields are either using the "Cards" or the inline-editable view mode, it's fine.
If the global set is saved in-between creating the outer (inline-editable) nested entry and the inner (cards) nested entry, the exception is not thrown.
I'm not able to reproduce the issue on 5.1.9.
Steps to reproduce
Expected behavior
Actual behavior
Craft CMS version
5.2.0-beta.3
PHP version
8.2.18
Operating system and version
DDEV v1.23.1
Database type and version
10.11.6-MariaDB (also tested on MySQL 8)
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered: