Open miloslavkostir opened 4 years ago
I can confirm this. Using Option 2 does not make the values in CP non-editable.
Using values from an environment file .env
disables a settings field entirely. Instead the message "Managed externally by your environment." is displayed.
@miloslavkostir In your example, this would mean using:
site/settings/environments/dev.yaml
settings:
debug: "{env:APP_DEBUG}"
debug: true
debug_bar: true
.env
APP_DEBUG=true
From what the docs state, both options should disable the editing of the values in CP.
This seems like a bug @jackmcdade @jasonvarga?
Agreed its a bug. But in my opinion it's better to use the .env option anyway. The other way is removed in v3, it's confusing.
Option 2: Environment files doesn't show Managed externally by your environment. in CP (as the doc says here) Option 1: Interpolation works well.
.env
:site/settings/debug.yaml
:site/settings/environments/dev.yaml
:Settings works. Debug is enabled as long as
APP_ENV
equaldev
in.env
file. But in CP I expect Managed externally by your environment. But there are regular editable inputs.If
APP_ENV == dev
andsite/settings/environments/dev.yaml
exists (as above): I can change the settings and submit the form. Statamic says Settings saved. but no change is saved in fact. After page refresh there are an original values (values fromsite/settings/environments/dev.yaml
).If
APP_ENV != dev
and current-env.yaml
file doesn't exists: I can change the settings, submit the form and changes are saved successfully into default settings filesite/settings/debug.yaml
Expected behavior
Environment details: