Trouble with 5.X Matrix and Multisite #15478
-
I have a deeply-nested matrix field in a multisite (multi-lang) craft 5 install. I'm populating the matrix field value automatically on EVENT_BEFORE_SAVE from data in an external API. The English version of the entry has a field with the ID of the remote English data, the French version of the entry has a field with the ID of the remote French data. I am able to create the matrix field value, but it saves to all of the language entries, not only the one that triggered the save event. If I manually change a value in the matrix, that works as expected (the change is isolated to the siteId of the current entry.) Question: Do I need to supply a siteId value to the matrix field in that save hook? If so is there documentation on how to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Can you post what the full content model is? Including your section and Matrix fields’ Propagation Method settings? |
Beta Was this translation helpful? Give feedback.
Ah, got it. thanks. Articulating the setup helped me find the issue:
Modules has the wrong propagation method. it should be: Only save entries to the site they were created in