-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Craft 3.5] Cloning or copy / pasting a set of Matrix blocks fails silently #13
Comments
Are you able to send through a screenshot of your blocks, or field setup? I can't seem to replicate this behaviour. See https://d.pr/v/cVQgFx |
In that album, the first 3 screens show what happens. The last 2 show the field config for the Matrix block in question. Fields are 3 * Drop downs and a 1 * lightswitch. I should add that if I try to clone or duplicate a Matrix block (from another field) containing only a Redactor field it duplicates fine. [Edit: It looks like imgur messed with the order of the images, - the above still applies but not necessarily in that order!] |
Thanks for the image, I still can't replicate it which is frustrating. I've just added some more logging in 1.1.9 if you feel like giving that a spin. There must be something unique with that field or blocktypes... |
Hi @engram-design , I updated to 1.1.9 and ran through the above again. Got the following in
The POST data was:
Around line 49 in FieldController |
Great, so that's a good start. So as the error states, it can't find the blocktype you're trying to copy in field ID 219. Can you confirm a blocktype with the handle of |
OK, after some digging: There are 2 different Matrix fields with the handle One is this one, exhibiting the issue (with block types: The other exists in another field group used on a different section (has a single block type Smith seems to be getting the wrong Matrix block type data. In the same controller as above, line 41 it gets the first field with a matching handle then later gets the block types out of it. In my case, I have 2 Matrix fields with the same handle. I'm not even sure that's a valid situation to be in, in which case there may be a Craft bug at the route of this that allowed 2 Matrix fields with the same handle to be created (although they are only used in different contexts so perhaps it is ok). |
You mention I can investigate further knowing that much though |
I didn't think it was possible. You are right - field id 219 is set as a child of a Super Table field, the field being found by the code Field 219 has a context column of Field 238 (the matrix that sparked this issue) has a context of This is according to the |
Think I've figured this out, if you're able to try by changing your
Then run |
Done - works great now - many thanks. |
Great, thanks for your persistence on this. Fixed in 1.1.10 |
No problem - it's going to help a few of our content editors on a couple of sites, so thank you for your work on the plugin. |
Steps to reproduce
Additional info
Additional context
The POST request to
https://hostname/index.php?p=[...]/actions/smith/field/render-matrix-blocks
looks like this:And the response like this:
Cannot see any logged errors.
The text was updated successfully, but these errors were encountered: