10

You can create a script to use the craft executable to sync your project config file ./craft project-config/sync


5

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 -> <project_root>/storage/rebrand/logo/<filename>.svg Site Icon -> <project_root>/storage/rebrand/icon/<filename>.svg By placing the images in the ...


4

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 ones that already do have them in the repo. That being said, from my experience the comments are only applies to NEW fields added after 3.6.8, or at least are not ...


2

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

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

I have just setup a Craft 3 boilerplate and got it working great. So yeah... this does work.


2

project-config/sync has been renamed to project-config/apply. Thus you would have to run: ./craft project-config/apply


2

If I create a folder assets at that location it works. I don't know what this asset folder is about.


2

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::projectConfigConfig(); $config['readOnly'] = false; return Craft::createObject($config); }, ], (Thanks Oli, Brandon, Andris!) Since I do all ...


2

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 Craft 3.1 project config. Redactor version 2.2.0: Redactor for Craft CMS now requires Craft 3.1. Improved Project Config compatibility.


2

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 load the plugin {% if env != 'dev' %} {% include ['_recaptcha/frontend'] %} {% endif %} You can also get the environment from the config: {% set env = ...


2

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 we recommend people setting to false on the live site just so someone doesn't accidentally update Craft from the control panel. The safer workflow is to have ...


2

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 running cron jobs). To remedy this, create an env text file to export all the same values as those in your production env variables. For this example name it ...


2

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 that any rebrand (logo, icon) files are stored in storage/ as well. But I just manually add them in via git add -f


2

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 fact, our deployment script for Craft projects uses this to take the system offline while the deployment is taking place: # create db backup before deployment ...


2

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.


1

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 prompted to. There's also a risk that your code will not have any effect if project config is in read-only mode. Instead, I would create a config settings file ...


1

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 to the Utilities -> Project Config and rebuild your config. Ref: https://craftcms.com/docs/3.x/config/config-settings.html#enablegql


1

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

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 found in the docs.


1

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 think of all of your sites as the same but Craft is thinking of each site independently because that's how it's designed. It sounds to me that one way to ...


1

solved it with a rebuilded project file locally.


1

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 enable admin changes when you're on the command line by using this config line in production environments: 'allowAdminChanges' => (php_sapi_name() === 'cli'),...


1

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

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 Or it's actually a craft bug, I'd advise you to search through The CraftCMS Github Issues and check if there's any issue resembling yours, if not create an ...


1

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, I chose content migrations and chose to basically ignore the projectConfig functionality for the most part during development. Since I originally asked the question projectConfig changed a bit ...


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