Make project config more tolerant when adding fields without groups #11522
-
If you have an existing project and you want to copy/clone certain fields to another project, this is rather handy, just take the corresponding field and matrixBlockType yaml files from project-config, copy them to the new project and update the TS in project.yaml But: if the corresponding field groups are not copied as well, it breaks the system, the field overview in CP's settings will not load anymore. I hope it would be a rather small change to move those new fields to the common group if the related group does not exist and it would not beak Craft anymore. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We can’t make changes to the project config as it’s being applied (like modifying the incoming field’s However an invalid field group UID won’t stop the field from getting saved; it will just be missing its From there you can edit the field and assign it to a group. |
Beta Was this translation helpful? Give feedback.
We can’t make changes to the project config as it’s being applied (like modifying the incoming field’s
fieldGroup
value).However an invalid field group UID won’t stop the field from getting saved; it will just be missing its
groupId
afterward. So I’ve just made a change for the next release, to make Craft more defensive about the fields missing theirgroupId
s (cb33c74). You won’t be able to add them to a field layout, but you will be able to access Settings → Fields without getting an error, and the field will be called out as “(Ungrouped)”:From there you can edit the field and assign it to a group.