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
user avatar
  • 198
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 -> <...
user avatar
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 ...
user avatar
  • 3,195
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 ...
user avatar
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
user avatar
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.
user avatar
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.
user avatar
  • 7,160
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 ...
user avatar
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.
user avatar
  • 1,032
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 ...
user avatar
  • 2,573
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.
user avatar
  • 3,664
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::...
user avatar
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 ...
user avatar
  • 2,437
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 ...
user avatar
  • 10.9k
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 ...
user avatar
  • 66.4k
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 ...
user avatar
  • 3,924
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 ...
user avatar
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 ...
user avatar
  • 6,315
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 ...
user avatar
  • 6,226
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 ...
user avatar
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 ...
user avatar
  • 1,130
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.
user avatar
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 ...
user avatar
  • 6,442
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 ...
user avatar
  • 6,442
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.
user avatar
  • 255
1 vote
Accepted

project.yaml synchronize error (not usable anymore)

solved it with a rebuilded project file locally.
user avatar
  • 86
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 ...
user avatar
  • 313
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 ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible