When changing unique properties of multiple existing elements, project config can fail if there's a value collision and the changes are processed out of order. See reproduction steps for a better explanation.
Difficult to protect against unless the order of PC edits is tracked or failed updates are retried after any other updates in the queue have been successfully applied (but this might end up causing a mess depending on if updates can be nested).
section1 and section2section2 to section3, then section1 to section2:boom: Applying changes from project.yaml ... error: Couldn鈥檛 save single entry due to validation errors on the slug and/or URI :boom:
#0 /var/www/html/vendor/craftcms/cms/src/services/Sections.php(1261): craft\services\Sections->_ensureSingleEntry(Object(craft\models\Section))
#1 /var/www/html/vendor/craftcms/cms/src/services/ProjectConfig.php(875):
Just fixed this for the next release, using the same strategy that we used to fix #5510: now if a Single entry isn鈥檛 able to validate due to a duplicate URI, it will be saved as disabled instead, so URI uniqueness isn鈥檛 validated.
Craft 3.4.25 is out now with the fix.
Most helpful comment
Just fixed this for the next release, using the same strategy that we used to fix #5510: now if a Single entry isn鈥檛 able to validate due to a duplicate URI, it will be saved as disabled instead, so URI uniqueness isn鈥檛 validated.