verbb / field-manager

Field Manager is a Craft CMS plugin to make it easy to manage your fields and field groups.
MIT License
199 stars 16 forks source link

Cloned fields do not save data when used in an Entry #57

Closed MattWilcox closed 5 years ago

MattWilcox commented 5 years ago

Description

A Cloned field is unable to save data into it. I had a short back and forth with Pixel and Tonic who were able to give this information, when a field I'd previously Cloned was not saving content in an Entry...

You have two Matrix fields (“Quick Links” and “Useful Info”) that each have “External Page” block types (16 and 28), and each of those are sharing the same field layout (21). Looking through your storage/config-backups/ folder, it looks like when you first created the “Useful Info” Matrix field, you may have created that manually, copying some of the “Quick Links” data over? And in the process you didn’t give the new “External Page” block type its own unique field layout UID.

I hadn't created the new Matrix field manually, I'd used Field Manager's Clone feature.

Steps to reproduce

  1. Clone a Matrix field
  2. Add the cloned field to an Entry Type
  3. Try and save any data into the field in an Entry
  4. No data will be saved to the field

Additional info

reilnuud commented 5 years ago

I'm also getting this error on 3.1.8. It seems like there is an issue where a cloned matrix field is taking the subfields from the original, not cloning them. Looking at the database directly, it did not duplicate the subfields. It also seems like depending on how you interact with the back end, they can switch back and forth from belonging to the original matrix field and the cloned one.

engram-design commented 5 years ago

FYI, Field Manager isn't fully tested in 3.1.x, but will be sorted very soon (ASAP) and in the next release. The underlying field API has changed a bit in 3.1.x

mateostabio commented 5 years ago

Same thing happened here. Now the field I initially cloned is somewhat corrupted and won't let the entry page save... Can't seem to be able to delete the corrupted field either...

engram-design commented 5 years ago

Should be fixed in https://github.com/verbb/field-manager/releases/tag/2.0.5