Add element check for (global set) project config sync #5257
Labels
bug
project config 🐫
features related to Project config
severity:normal
Bugs that affect typical usage
What happened
Project config sync failed to create a global set fully, setting the ID to a random element.
Why it happened
A field plugin threw an exception (during validation) inside the associated fieldset, which meant that the element save failed. This meant there was no ID for the globalset sync (below). The default
globalset
table auto increment was used, which caused an invalid reference to an element with the same ID.cms/src/services/Globals.php
Lines 441 to 445 in a0ed3fb
How to fix it
I think we should introduce a check here to ensure that the element is saved.
Without looking, I suspect that this applies more broadly to project config syncing. This could’ve been rather messy had we not tested this a few times locally.
The text was updated successfully, but these errors were encountered: