You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an error when applying the project config in a particular branch. I can't reliably reproduce the error yet, but it's happened multiple times in this specific branch.
I have a branch that adds some sections, entry types and fields. Last time I worked on it, I created some entries to test with. Then I went back to another branch and applied the config, so all those sections, entry types and test entries were (soft-)deleted. Now when I go back to the to branch and run php craft up, I quickly get this error:
❯ php craft up
Checking for pending Craft and plugin migrations ...
No new migrations found. Your system is up to date.
Applying changes from your project config files ...
- updating dateModified ... done
- adding entryTypes.45b0f636-480b-4bc2-b8f0-0beb66debd75.fieldLayouts.ffba8421-71c0-4967-a483-ec914c319518.tabs.0.elements.4.elementCondition.conditionRules.0 ...
- adding meta.__names__.45b0f636-480b-4bc2-b8f0-0beb66debd75 ... done
- adding entryTypes.45b0f636-480b-4bc2-b8f0-0beb66debd75 ...
- adding meta.__names__.2117db37-8708-4ac7-a076-e3b27d1ac7c8 ... done
- adding fields.2117db37-8708-4ac7-a076-e3b27d1ac7c8 ... done
- adding meta.__names__.a493df13-b10f-45d8-a048-cd2e6cf91d83 ... done
- adding fields.a493df13-b10f-45d8-a048-cd2e6cf91d83 ... done
error: Invalid section ID: 18
When I run php craft up again after this, the command says the system is up to date, but deletes all the new config entities from the config folder:
❯ git status
// …
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: config/project/entryTypes/bulletin_board--45b0f636-480b-4bc2-b8f0-0beb66debd75.yaml
deleted: config/project/entryTypes/bulletin_board_post--29bd856c-c0e2-4b07-83aa-0c30dc6acd8e.yaml
modified: config/project/project.yaml
deleted: config/project/routes/aaea878b-29df-4b75-ad8c-1c48430a63b9.yaml
deleted: config/project/routes/dc9dbc5a-4b5e-4228-a69d-ba4b93790f1c.yaml
deleted: config/project/routes/f3ca972e-536c-4d13-a744-b01828e7e331.yaml
deleted: config/project/sections/bulletin_board--c1b6392f-ad9e-4f3e-aad3-e8c25b5f6724.yaml
deleted: config/project/sections/posts--e1809aab-fd36-4ede-9314-49732237fa5a.yaml
deleted: config/project/users/groups/member--4ea16709-ea56-4dd8-9008-ca3f98710a0f.yaml
Looks like it's trying to restore the previously created entries, but fails because the section doesn't exist (yet)?
I tried running gc/run to delete all trashes and soft-deleted entries, after that I can switch branches and apply the config without getting this error. So most likely it's related to those soft-deleted entries?
Craft CMS version
5.4.4
PHP version
8.3
Operating system and version
OS X
Database type and version
MySQL 8
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered:
What happened?
Description
I'm getting an error when applying the project config in a particular branch. I can't reliably reproduce the error yet, but it's happened multiple times in this specific branch.
I have a branch that adds some sections, entry types and fields. Last time I worked on it, I created some entries to test with. Then I went back to another branch and applied the config, so all those sections, entry types and test entries were (soft-)deleted. Now when I go back to the to branch and run
php craft up
, I quickly get this error:When I run
php craft up
again after this, the command says the system is up to date, but deletes all the new config entities from theconfig
folder:Here's the stacktrace from the console log:
Looks like it's trying to restore the previously created entries, but fails because the section doesn't exist (yet)?
I tried running
gc/run
to delete all trashes and soft-deleted entries, after that I can switch branches and apply the config without getting this error. So most likely it's related to those soft-deleted entries?Craft CMS version
5.4.4
PHP version
8.3
Operating system and version
OS X
Database type and version
MySQL 8
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: