11
votes
Accepted
Is there a way to apply project.yaml changes on deployment?
You can create a script to use the craft executable to sync your project config file
./craft project-config/sync
5
votes
Accepted
Login Page Logo and Site Icon with Project Config
System Settings don't support rebranding via Project Sync, however if you place your assets in the following locations and commit to GIT you can get similar results.
Login Page Logo -> <...
4
votes
Accepted
How to prevent inconsistent comments in generated project config YAML files
Comments were added to Project Config files after Craft 3.6.8 referencing GitHub issue 7584.
They shouldn't be appearing and disappearing unless you're committing config files without them over the ...
4
votes
Accepted
Your project config YAML files are expecting different versions to be installed
That error occurs when there is a discrepancy between the schema versions listed in your incoming project config YAML, and what’s actually installed.
If you have the site installed locally, try ...
3
votes
Is there a way to apply project.yaml changes on deployment?
project-config/sync has been renamed to project-config/apply.
Thus you would have to run:
./craft project-config/apply
3
votes
GIT shows multiple changes in project config, only line breaks are different (Mac)
What helped me was changing the way GIT treats CRLF with this command:
git config --global core.autocrlf input
After running this command only real changes were tracked anymore.
2
votes
Accepted
Response: {"error":"Undefined index: fieldGroup"}
You can rebuild your project.yaml by running ./craft project-config/rebuild.
In terms of workflow here's a good article that discusses it.
2
votes
Accepted
project.yaml stopped syncing changes in the staging process
P&T recently released an update with a new console command:
project-config/rebuild
This does exactly what it sounds like, it rebuilds the config ...
2
votes
Accepted
Is it possible to create a Craft boilerplate out of a project.yaml file?
I have just setup a Craft 3 boilerplate and got it working great. So yeah... this does work.
2
votes
How do I know if a plugin supports Craft 3.1's project config?
The best I could find was searching thru a plugin's changelog in the Craft Plugin Store for something like "Added support for Craft 3.1 project config."
Super Table version 2.1.1:
Added support for ...
2
votes
Sections in local & LIVE out of sync
If I create a folder assets at that location it works. I don't know what this asset folder is about.
2
votes
Redactor migration might fail with allowAdminChanges & useProjectConfigFile false
According to P&T this is expected behavior. Their solution is to put this in config/app.php:
'components' => [
'projectConfig' => function() {
$config = craft\helpers\App::...
2
votes
Craft CMS Project Config file override
I'm not familiar with this plugin, but could probably do this in your template where the plugin is called:
// Get the environment
{% set env = getenv('ENVIRONMENT') %}
// If anything but dev, then ...
2
votes
Should delta.yaml be committed to git?
No, you would not check these files into Git.
I have a .gitignore rule to just ignore everything in storage/ and so I treat it as a cache directory.
Which it is... except for the unfortunate fact ...
2
votes
Accepted
Project Config On or Off for Production Server
Even if useProjectConfig was set to false, it's not a good idea to update Craft on a live site because, as you've discovered, errors sometimes happen.
There's even an allowUpdates config setting that ...
2
votes
Applying project config changes with post-receive git hook
Based on your comment that you get an error saying Craft is not installed, to me that suggests the bash script does not have access to your environment variables, (this can also be a problem when ...
2
votes
Accepted
Trouble updating Craft when allowAdminChanges is false
I think P&T changed the behavior in Craft 3.1.0 and newer. Before 3.1.0 it was necessary to have 'allowAdminChanges' => true with updates in/to project config.
To be 100% safe you can always ...
2
votes
Accepted
Managing `isSystemLive` with Project Config
You can use the console commands off and on to take the system offline or online, respectively. This bypasses the allowAdminChanges setting and is explicitly intended for usage during deployments.
In ...
1
vote
Where can a module safely store Project Config settings?
Manually updating the project.yaml file is not recommended, in my opinion, especially if adding your own custom settings. It is not intended for manual editing and can be rebuilt from the database, if ...
1
vote
Graphql schema causing error on project-config/apply
GraphQL is enabled by default in Craft CMS. Have you tried adding
'enableGql' => false
to your general.php config file? This should disable anything related to GQL, including the schemas. Then go ...
1
vote
Project config issues with multi-node clusters?
As the Craft documentation suggests, it's best to avoid configuration changes in production by setting the $alloAdminChanges General setting to false.
In my company, we're used to doing all ...
1
vote
Accepted
Is there a way to allow "read only" access to settings in environments where 'allowAdminChanges' => false?
You can view the entire project config data from Utilities → Project Config, which should contain whatever values you’re looking for.
You can find a related discussion at craftcms/cms#4371.
1
vote
Write project config to cloud storage
Untested but you might want to try setting CRAFT_EMPEMERAL to true to skip the filesystem checks.
You can also opt out of automatic project config creation using the Manual YAML File Generation method ...
1
vote
Maintaining and deploying many multi-site from a single codebase
Craft's Project config is really made for updating changes from staging to production.
When it comes to making changes across a fleet of (different) sites, you're somewhat on your own there. You might ...
1
vote
Should delta.yaml be committed to git?
Just stick with the .gitignore of Craft.
https://github.com/craftcms/craft/blob/main/storage/.gitignore
I assume it's better to commit the folder, as config-deltas is not in the official .gitignore.
1
vote
Accepted
project.yaml synchronize error (not usable anymore)
solved it with a rebuilded project file locally.
1
vote
Project file changes causing `SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'`
As far as I know the craft_info table should only have one row.
This would mean that either:
You have something installed / configured wrongly somewhere causing it to insert a 2nd row into the table
...
1
vote
Should project config be used during development when migrating from Craft 2?
I'll answer this for the benefit of anyone else attempting the same thing i.e. sizeable Craft 2 to 3 migration, while you still have the Craft 2 site live.
Ultimately for large sites where you might ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
projectconfig × 30project.yaml × 13
craft3 × 8
git × 4
migration × 3
plugins × 2
deployment × 2
settings × 2
control-panel × 1
database × 1
redactor × 1
admin × 1
multi-site × 1
modules × 1
multi-environment × 1
updates × 1
composer × 1
frontend-form × 1
graphql × 1
environmentvariables × 1
bug × 1
staging × 1
phpstorm × 1