Open NickHolder opened 2 years ago
This is most likely due to an issue with your project config YAML – perhaps as a result of a bad Git merge conflict or something.
Please write into support@craftcms.com with a copy of your incoming YAML files, a database backup, and your Composer files, and we can try to help from there.
I also faced this issue, sometimes it is saying no entry types, sometimes it said not site settings. The step that when I got this issue.
I have tried these steps 5 time and get the same results. But the strange this, when step 2 failed, I tried rebuild the project yaml (from non working pc after failed the apply changes) then I rollback all project yaml ( means removing the result of the rebuild) then do apply changes again, then the apply changes become success all these 2 section that newly added is appear.
Nb : If I force the apply changes with ./craft project-config/apply --force
the apply changes is success but these two section will lost their entry types.
@aodihis If you’re even seeing this issue with a fresh DB, there must be something not quite right with the project config. Please send your config/project
folder, and your composer.json
+ composer.lock
files, over to support@craftcms.com. We can look into it from there.
This is most likely due to an issue with your project config YAML – perhaps as a result of a bad Git merge conflict or something.
Please write into support@craftcms.com with a copy of your incoming YAML files, a database backup, and your Composer files, and we can try to help from there.
Thanks for the reply, unfortunately in this case it is not a git merge issue as it is reproducible on a fresh install of Craft without git being involved.
We can only replicated it when SEOmatic is installed and we create a new Single Section.
Disabling SEOmatic after a failed apply will allow the project-config to apply properly.
SEOmatic does not appear in the stack trace for the error, which khalwat confirmed on SEOmatic's repo
@NickHolder I'm unable to reproduce this following the steps exactly. The only difference is that I'm on Craft 3.7.31 and on Nitro.
It would be great if you could still send over the files so we could reproduce this locally!
In my side I always get the issue when I run on the environment that use php 7.4.3 and seomatic activated if I disabled the seomatic the project changes will working Also after some experiment I try to update my php version to 8.0, the apply changes is working normally with seomatic enabled.
We re-ran the test on a few other environments and as per @andris-sevcenko 's comment it is working in Nitro:
Our Linux staging server is also succeeding with a similar test. I believe this issue was also happening on a MAMP set up (on Mac)
It looks like the failing environments are all running on MacOS, while the succeeding environments are all running on Linux (some via docker).
@NickHolder any chance you want to try this on Craft 4 beta? We refactored a bunch of stuff there for Project Config - maybe it caught this (arguably elusive) bug.
@andris-sevcenko On Craft 4 beta 3 the application process throws an error when run from the control panel:
When run from the command line it applies without error :)
When run from the command line it applies without error\
Sounds like a JS error. Can you try again on Craft 4 beta 4 and see I there any errors in your browser's dev console?
We've been having similar issues with adding new Sections moving from dev to staging to live. We do also have SEOMatic installed.
We found that this can be resolved by going into Settings -> Sections and then finding the newly added sections, Saving them and then checking/adding the required Entry Types and saving again.
It's then possible to apply the Yaml changes.
The whole 'massive YAML file for configuration' has caused us lots of issues with Git and deploying. We're working on an older site we inherited which uses Crat 3, and looking to rebuild in Craft 4 this year - so hopefully things are easier with 4!
Describe the bug
Applying project-config changes that contain a new Single section will error saying the section (that you are creating) has no entry type when SEOmatic plugin is installed.
SEOmatic does not appear in the stack trace of the error. SEOmatic does appear in the web.log and console.log but it looks like only for it’s Loaded Event. However whilst trying to debug this issue our team disabled each of the 10+ plugins on the site we are building and only disabling SEOmatic allowed us to apply the project config containing a new Single successfully, and it is reproducible on a fresh craft install with only SEOmatic added.
To reproduce
Steps to reproduce the behaviour:
Expected behaviour
Project config should apply without error and add your new Single section.
Screenshots
Versions
project-config-console.log project-config-web.log project-config-error.txt