-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential issues with plugin config file settings #144
Comments
Maybe overriding the settings key of the plugin in the override file with null or an empty array will solve your issue? |
@bvangennep for use in importing or exporting? I tried the following, and the plugin settings were still exported:
|
@timkelty did you use this in the override file with the latest schematic version? |
@boboldehampsink Yeah, 4.0.8 The above overrides file worked for import ( via Is that expected? |
Separate issue, but I think its a little confusing that |
Well, since 4.0.8 the exported yaml is overridden with the override contents. And the override file is also automatically picked up in importing ;-) The argument flag is there if you want to use an other location or filename for the override file. |
Ok let me do some more testing and make sure I'm giving your the right info :) |
🤦♂️ ok all is working with override…I named my file overrides.yml 😁 So…back to the original issue - I'm wondering if Schematic should detect if a value is non-primitive (closure, etc) and throw an error when exporting? |
FWIW, I tried this and it did not work: My goal was to still export
|
We'll look into it, for now you should be able to work around it with the override at least. |
Some plugins have settings thats cannot be translated to static values (e.g. closures), that are explicitly set in config files.
I recently ran into an issue with https://github.com/clubstudioltd/craft-asset-rev, where I exported (and later imported) but didn't notice that it imported the settings from my
config/assetrev.php
file.In fact, that plugin has NO CP-set config options, so when they get entered in the DB via Schematic things get weird.
Furthermore, one value is a anonymous fn, which ended up importing as
null
, which broke things.Any ideas on how to handle this, other than just excluding plugins?
The text was updated successfully, but these errors were encountered: