It currently *looks* like the config system would depend on the public:// path configuration, but it actually does not. See discussion in #1496480-108: Convert file system settings to the new configuration system and following comments.
In #112, I proposed to use the full relative path from DRUPAL_ROOT in the config directories, basically making the absolute flag the default and removing it. Combined with adding the file_path_public as a setting to settings.php only, this should make it easier to understand how these two configurations relate to each other.
Because right now, you might think that if you change the location of the public files, you also need to move the config folder. Which you actually are not supposed to do.
Alternatively, once file_public_path is a setting, CMI could actually depend on it and use it. But I would prefer a complete path in settings.php
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 1887750.22.patch | 7.47 KB | alexpott |
| #22 | 21-22-interdiff.txt | 2.44 KB | alexpott |
| #21 | 1887750.21-interdiff.txt | 2.02 KB | berdir |
| #21 | 1887750.21.patch | 5.74 KB | berdir |
| #18 | 1887750.18.patch | 4.04 KB | alexpott |
Comments
Comment #1
berdirThis seems to work fine. Will, of course, break all existing installations in interesting ways ;)
Not converted to $settings yet, as drupal_write_settings() does not support it yet...
Comment #3
berdirUpdated default.settings.php and fixed the reference in TestBase. This should fix most if not all test failures.
Comment #5
berdirThis should fix the DUBT tests.
Comment #6
gddComment #7
berdirTagging.
Comment #8
berdirThe comment here needs to be updated/removed.
Comment #9
berdir#5: config-directories-structure-1887750-5.patch queued for re-testing.
Comment #11
alexpottDiscussed with @berdir on IRC and agreed that this was important due to the fact that:
So for example if you want to store configuration in
sites/all/configMand keep the staging under git you'd have to use an absolute path. With this patch you got use a path relative to DRUPAL_ROOT. This makes transporting settings.php easier.Comment #12
berdirRe-roll, will update the issue summary and so on asap.
Comment #14
sunHm. The original idea of #1741804: Implement a config import/staging directory was to allow to move the configuration directories outside of the public document root. For example, for security reasons.
Looking at the configured paths in settings.php in this patch, it appears we'd be removing support for that option?
That said, I was never really happy with the extra
'absolute'key. Normally, you'd expect file paths to work exactly as in any other PHP code; i.e.:sites/default/files/config_active → DRUPAL_ROOT/sites/default/files/config_active
/var/drupal/config → /var/drupal/config
public://config_active → DRUPAL_ROOT/sites/default/files/config_active
The focus is on natural absolute vs. relative paths. The last stream wrapper example can be ignored, if it's not possible due to bootstrap dependencies.
Comment #15
alexpottre #14 as far as I understand that is exactly what Berdir is proposing :)
Comment #16
berdirYes, the absolute flag was necessary because we enforced the config path, with this, you can specify a relative or absolute path simply by doing so, just like the public files path.
Comment #17
sunI assume that this change is the error:
Unfortunately, I'm not familiar with the structure/features of install_rewrite_settings().
But it looks like 'required' is placed in the wrong spot and the 'value' + 'required' actually need to be properties of an anonymous object?
Comment #18
alexpottThe patch attached should fix it.
After applying this patch the values in my settings.php are:
Comment #19
alexpottGo testbot go!
Comment #21
berdirThanks, this should fix the web tests...
Comment #22
alexpottI think we need to fix the installer tests too
Comment #24
alexpott22: 1887750.22.patch queued for re-testing.
Comment #25
alexpott22: 1887750.22.patch queued for re-testing.
Comment #26
sunLooks good to me, let's move forward here.
Comment #27
chx commentedSo config was not using absolute paths before but because
file_get_contentsused inFileStorage::readdefaults to$use_include_path = falsethis does not pose a performance problem. Then, I guess we need to file a separate issue forlistAllnot supporting outside of webroot paths, right?Comment #28
xjm22: 1887750.22.patch queued for re-testing.
Comment #29
webchickThis patch breaks
drush si:This might be unavoidable, or it might be pointing to a bug. Setting back to needs review to find out.
Comment #30
alexpott@webchick
drush siworks fine for me. I suspect that you did not re-create your settings.php and therefore had the$config_directoriesglobal declared with the old structure as that would cause the error you are seeing.What this does mean (and it is unavoidable) is that this patch will break every existing install of Drupal 8.
Comment #31
berdirYes, I think the testbot uses drush si now as well, so it would not be able to install there.
As @alexpott mentioned, the real problem is probably that you have an old settings.php with the old $config_directories variable.
Yes, this does break every install completely, it is however very easy to fix.
Simply convert this:
To this:
Make sure that you do this before you attempt to load the site again, or it might result in inconsistent caches.
While working on this, I had both versions in my settings.php and just commented the one that I didn't need.
Comment #32
damiankloip commentedAlso, unless a patch stops the testbot from installing with drush (we have no choice then) we should never hold up patches on that. It should be up to drush to keep up with core.
Comment #33
catchCommitted/pushed to 8.x, thanks!
Needs change notice (or update to one) for the changed $settings.
Comment #34
berdirUpdated https://drupal.org/documentation/administer/config, was the only place on d.o that I could find that references this and isn't an issue.
Also created https://drupal.org/node/2164727.