This was an old trick for Drupal 7. By adding a settings.local.php file, we could set the 'file_private_path' and this would automatically override the config settings. I tried that tonight, but after importing the active site config, the private path is set to the value in the config files.
```$settings['file_private_path'] = 'private';```
Any way to override that for local?
As an addendum to this answer, part of my work tonight was writing a sync script using BRUSH. I have opened an issue there asking about enabling variable-set commands in brush, but that is probably also related to the question above.
Thanks!
Comments
Hey Wylbur,
See the 'Configuration overrides' section of
settings.php
:Cross-posting my reply from https://github.com/backdrop-contrib/brush/issues/24 ...
Hey @Wylbur 👋
variable_get()
andvariable_set()
have been deprecated in Backdrop, in favor of CMI. See the following resources for more info:- https://api.backdropcms.org/change-records/converted-all-variables-cmi
- https://api.backdropcms.org/documentation/working-with-configuration
- https://api.backdropcms.org/api/backdrop/1/search/variable_get
- https://api.backdropcms.org/api/backdrop/1/search/variable_set
You will need to use the
config_get()
andconfig_set()
functions respectively instead.For brush specifically, the relevant
config-*
commands seem to be:brush config-list
(brush clist
for short)brush config-get
(brush cget
for short)brush config-set
(brush cset
for short)brush config-clear
(brush cdel
for short)See the
config_brush_command()
function for details: https://github.com/backdrop-contrib/brush/blob/1.x-1.x/commands/core/con...PS: there seem to be aliases set for the "old"
variable-*
commands, but you should stop using those:brush clist
may also bebrush vlist
brush cget
may also bebrush vget
brush cset
may also bebrush vset
brush cdel
may also bebrush vdel
For setting the
stage_file_proxy_origin
setting specifically, please try the following command (untested):To find which settings file and which specific "variable" ("setting" now) to use for the command above, I've looked in the
/config
folder of the stage_file_proxy module, for its default .json config file. See: https://github.com/backdrop-contrib/stage_file_proxy/blob/1.x-1.x/config...Hope this helps 😉