Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of order project config updates can result in error #4369

Open
mattgrayisok opened this issue Jun 6, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@mattgrayisok
Copy link

commented Jun 6, 2019

Description

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).

Steps to reproduce

  1. With PC enabled locally create sections called section1 and section2
  2. Push to remote and sync PC
  3. Locally change section handles section2 to section3, then section1 to section2
  4. Push to remote and sync PC

💥 Applying changes from project.yaml ... error: Couldn’t save single entry due to validation errors on the slug and/or URI 💥

#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): 

Additional info

  • Craft version: 3.1.26
  • PHP version: 7.3.6
  • Database driver & version: MySQL 5.5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.