Problem/Motivation
Following #2161591: Change default active config from file storage to DB storage now the DB storage is the default storage for configuration. However default.settings.php still says:
* By default, Drupal configuration files are stored in a randomly named
* directory under the default public files path....
*
* @todo Flesh this out, provide more details, etc.
Followed by
* By default, the active configuration is stored in the database in the
* {config} table. To install Drupal with a different active configuration
Both cannot be true at the same time. Also fleshing out the file storage docs would indeed be in order to explain when it is used at all. I think it would be used in bootstrap but not sure(?).
Proposed resolution
Fix the docs.
Remaining tasks
Update the documentation to reflect the change in #2241633: Simplify site-specific service overrides.
User interface changes
None.
API changes
None.
Task | Novice task? | Contributor instructions | Complete? | |
---|---|---|---|---|
Create a patch | Instructions | |||
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Instructions |
Follow-up
Comment | File | Size | Author |
---|---|---|---|
#54 | interdiff-2243439-49-54.txt | 3.4 KB | amitgoyal |
#54 | 2243439_54.patch | 4.83 KB | amitgoyal |
#30 | 2243439-30.patch | 4.21 KB | pwolanin |
#30 | increment.txt | 1.18 KB | pwolanin |
#23 | 2243439-23.patch | 4.26 KB | scor |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedI'll try to make a patch today
Comment #2
Gábor Hojtsy@pwolanin: I fear this may fall of the radar soon if not done quickly. Any suggestions? :)
Comment #3
pwolanin CreditAttribution: pwolanin commentedThis is really a doc issue - just changing comments or commented-out lines.
Comment #4
Gábor Hojtsy- "in in"
- This does not explain how the staging and active directories relate, there is just one directory mentioned. Is the mentioned directory the active one? Then this text should say that is the active directory, and what staging is used for no?
Comment #5
pwolanin CreditAttribution: pwolanin commentedadded more explanation
Comment #6
Gábor HojtsyYay! Now I think I understand it all. The only thing this paragraph does not mention is this is the staging directory. Since the second para talks about the active directory, I think one little change to say this one is about the staging directory should clear everything up.
Comment #7
pwolanin CreditAttribution: pwolanin commentedComment #8
Gábor HojtsyI think I understand all of this now. Good updates. Thanks a lot.
Comment #9
sunHm. Not sure whether we want to document that, given #2241633: Simplify site-specific service overrides
As a follow-up to that issue, I'd actually recommend to remove the
$GLOBALS['conf']['container_yamls']
variable entirely, and instead, make the kernel additionally check for a environment-specificservices.$env.yml
file.Aside from that, this looks relatively good to me. I only wondered whether there's a possibility to shorten the text in any way?
Comment #10
sunCreated #2244807: Replace $GLOBALS['conf']['container_yamls'] with optional $conf_path/services.$env.yml file
Comment #11
mtiftThis is a huge improvement! Two minor nitpicks:
These should probably both start, "By default," (with a comma).
I'd change this to "See the active configuration settings documentation below."
Comment #12
pwolanin CreditAttribution: pwolanin commentedMinor wording tweaks as suggested.
Comment #13
jhodgdonI think this still needs some work. Starting with the first paragraph:
a) The word "default" and phrase "by default" occur way too many times. It's kind of hard to read.
b) There's an extra space near the end of the 2nd line here.
c) This isn't actually accurate. The config directly is the random-named directly that is created, and under that, there's "active" and "staging".
d) "docroot" is also not a word. Say "document root" please.
e) This paragraph is a mix of talking about config storage and config import and config directories. It's very confusing. Start at the beginning (what this setting is for: the config directories), and then explain what the config directories are used for, maybe?
Second paragraph:
f) What does "next to" mean?
Third paragraph:
g) See (d).
Last section of patch:
h) Extra blank line has been added.
Very end of patch:
i) That GLOBALS line is not explained, is it?
And then...
j) The active and staging config directories are given README files when you install. These I think also need an update in this patch.
Comment #14
cilefen CreditAttribution: cilefen commentedAttempting a-h. Thoughts?
Comment #15
cilefen CreditAttribution: cilefen commentedj
Comment #16
jhodgdonMuch better thanks!
Still some things to fix:
a) install.inc
... By default, this directory will be empty. To move this configuration between environments,...
So by default it is empty, and then you can move the configuration??? Maybe say "If you are using files to store configuration, and you want to move it between environments..." or something like that?
b) default.settings.php
I'm still confused here. If someone uncommented these two lines, what else would they need to do in order to get this to work, so that they are using files as their active config storage? And shouldn't it be pretty easy to do that, since I think the services/classes to do this already exist in Core, don't they??
So can we instead give explicit instructions here, like "Uncomment these two lines, change X to Y, and they in a module, do Z"? I just don't understand the instructions that are in this patch (or the ones that were in the file before the patch, for that matter). And I have no idea whether or not the $GLOBALS line is correct or not either.
Comment #17
cilefen CreditAttribution: cilefen commentedThis is just the README change.
Comment #18
sunI'd prefer to wait until #2241633: Simplify site-specific service overrides has landed, so we do not have to document how to futz with global variables here, because futzing with global variables is something we shouldn't document.
Comment #19
cilefen CreditAttribution: cilefen commented@sun Makes sense.
Comment #20
pwolanin CreditAttribution: pwolanin commentedThis issue is in, so we should be able to update the patch now: #2241633: Simplify site-specific service overrides
Comment #21
Gábor Hojtsy17: 2243439-17.patch queued for re-testing.
Comment #23
scor CreditAttribution: scor commentedstraight reroll of #17, I haven't addressed #18.
Comment #24
amitgoyal CreditAttribution: amitgoyal commented#23 looks good to me.
Comment #25
scor CreditAttribution: scor commented@sun, #18 still needs to be addressed, right? or did it go away?
Comment #26
jhodgdonIt looks like the patch still adds a GLOBALS and according to sun/comment #18 this should go away, so marking Needs Work. Someone needs to read the other issue (or its change notice) and figure out what changed, or maybe sun can make a suggestion?
Comment #27
cilefen CreditAttribution: cilefen commented23: 2243439-23.patch queued for re-testing.
Comment #28
cilefen CreditAttribution: cilefen commentedGetting ready for the Austin DrupalCon sprint, following http://www.hook42.com/blog/prepping-drupalcon-austin-sprints-sprint-lead...
Comment #29
jhodgdonCan we please leave this issue at Needs Work until the issues in #18/#26 are addressed, thanks!
Comment #30
pwolanin CreditAttribution: pwolanin commentedHow about this?
Comment #31
jhodgdonBetter! Now I think we can bikeshed about the quality of the documentation. I have a few thoughts:
a) In install.inc:
I don't think we "see" URLs.... How about "To import this configuration, visit ..." ?
b) First chunk of default.settings.php:
There is a ton of redundancy in the first two paragraphs, and I don't think "configuration" should be pluralized... How about:
c) Last chunk in default.settings.php (I omitted the - lines for clarity):
I found this pretty hard to scan... How about:
Thoughts?
Comment #32
cilefen CreditAttribution: cilefen commentedCan we leave the edits for a novice to attempt on the June 6 Austin sprint please?
Comment #33
jhodgdonMaybe, but I am usually against "reserving" issues for sprints... I understand wanting to have issues that are appropriate for novices to work on at a sprint, but there is no guarantee that if we ask someone not to work on an issue today, that it will get fixed tomorrow at the sprint.
I'd prefer not to discourage anyone from fixing any issue at any time. There are also people at DrupalCon all week getting mentored, not necessarily at a formal "sprint", and doing great work on issues, so reserving this for a particular sprint session doesn't seem like the right thing for those people either?
Comment #34
mark.labrecqueI'm a novice, I will check this out :)
Comment #35
mark.labrecqueHow does this look to you all?
Comment #36
mark.labrecqueComment #38
mark.labrecque35: 2243439-35.patch queued for re-testing.
Comment #40
mark.labrecqueComment #41
mark.labrecqueComment #42
cilefen CreditAttribution: cilefen commented@mark.labrecque If the patch doesn't apply, try a simple git diff instead of git format-patch.
Comment #44
mark.labrecqueThanks for the tip! I will do that
Comment #45
cilefen CreditAttribution: cilefen commentedAlso be sure to use unique patch file names that match the comment number.
Comment #46
mark.labrecqueFingers crossed...
Comment #47
mark.labrecqueComment #48
pwolanin CreditAttribution: pwolanin commentedLooks generally good, but not sure why this is indented:
Comment #49
mark.labrecqueAh, I missed that. Thanks for pointing that out.
Comment #50
mpv CreditAttribution: mpv commentedPatch looks good to me.
Comment #51
jonreid CreditAttribution: jonreid commentedLooking at this now as a second review.
Comment #52
jonreid CreditAttribution: jonreid commentedPatch applies. Documentation looks good.
One caveat:
In applying the patch, I received a permissions issue on the second file change (default.settings.php). I had to roll back and manually change the rights on the default folder for the patch to apply. This won't be an issue for new installs once the changes are rolled into core.
Webchick mentioned this is a known issue and suggests:
sudo git checkout -- sites/default
OR
chmod ug+w sites/default
Comment #53
jhodgdonLooking better, thanks for the patch(es)!
A few notes:
a) install.inc
I don't think "contents from this directory" makes sense... maybe "files from this directory"?
b) default.settings.php
Could we fix up the wording here? "never saved together with" ?!? "value using the contents of a file" ?!? What is this actually saying? And... this is actually out of scope for the issue here (it is in the "salt" section)... but if we are going to change this line anyway, could we fix it so it actually makes sense? My suggestion:
For enhanced security, you may set this variable to the contents of a file outside your document root; you should also ensure that this file is not stored with backups of your database.
c) default.settings.php
List formatting: the - in list items should line up with the text above. So the entire list needs 2 spaces less indentation.
Other than that, looks good, thanks!
Comment #54
amitgoyal CreditAttribution: amitgoyal commentedPlease review revised patch with fixes in #53.
Comment #55
jhodgdonLooks good, thanks!
Comment #57
jhodgdonThanks again everyone! Committed to 8.x.
Comment #58
YesCT CreditAttribution: YesCT commentedWhat does:
actually mean to do?
what exactly should I put in the yml file?
?
Comment #59
vijaycs85haven't tried, in theory yes.
We need to define active storage. Say, if we want to use fileStorage by default:
Comment #60
jhodgdonYesCT: Do you want to reopen this issue, or file a new one? If you think the docs need to be clarified, we can do that. But I think if someone is going to do this, they'll hopefully realize they need to figure out how to override a service and look at the Services and Dependency Injection Container topic on api.drupal.org (linked from the api.d.o landing page) and figure out how to define a service.
Comment #61
YesCT CreditAttribution: YesCT commentedOpened #2291587: Document how to toggle to file configuration storage in settings.php
Comment #63
davidwbarratt CreditAttribution: davidwbarratt commentedRelated Question:
http://drupal.stackexchange.com/questions/151604/is-there-any-sensative-...
Please post an answer if you know it. :)