Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
example.settings.local.php uses yoursite.com as a placeholder name for a multisite site. This is inconsistent with the rest of the internet which uses example.com, but it also does not communicate that the name must be substituted for the site's real name.
Proposed resolution
Use a wildcard instead.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#10 | drupal-example.sites_.local_.php-2263059-10.patch | 743 bytes | Bryn Vertesi |
#1 | drupal_2263059_1.patch | 675 bytes | Xano |
Comments
Comment #1
XanoComment #2
XanoComment #4
jhodgdonAgreed with the issue summary -- the Drupal project also has a standard that we should use example.com (as you say, to be in line with the rest of the Internet).
I don't quite agree with the patch though:
I think maybe it should say something like "... path plus filename is 'sites/SITEDIR/settings.local.php', where SITEDIR is your site's directory..." -- would that be clearer? I just don't think putting a * in an instruction is very clear, without explaining what to substitute for the *.
Also, the */ in there is ending the comment! That is why it is getting "invalid PHP syntax". Oops!
Comment #5
XanoI'll look up how we refer to these instructions elsewhere in core. example.com is an example, but in this case we also need to make sure people understand they have to fill in that part of the path (and nothing else) themselves.
Yup. That was my WTF of the day :')
Comment #6
jhodgdonRE #5, look at sites.php, which I think is where the multi-site setup is documented, or maybe it's a readme in the sites top-level folder. We should definitely make sure that the terminology is consistent between all of them. Because this file could be going in sites/default or sites/example.com or sites/2048:example.com, or whatever... and actually I think in 8 the possibilities are even greater, due to the necessity of having a sites.php? Seems like we had a docs issue about that a month or two ago. Anyway... that is where I would start looking.
Comment #7
XanoUnderstood. I appreciate the pointers :)
Comment #8
Bryn Vertesi CreditAttribution: Bryn Vertesi commentedAfter reading your suggestions, I decided to change "yoursite.com" to "example.com" and added a line of explanation that "example.com is, in fact, your site name.
Comment #9
jhodgdonThat looks great to me, thanks!
However, there is an extra space at the end of one of the lines. If you plan to work on Drupal patches (and I hope you will!), you may want to set your editor to either highlight or strip out end-of-line spaces. Most programming editors have a setting for that.
Comment #10
Bryn Vertesi CreditAttribution: Bryn Vertesi commentedThanks! I just made the fix and resubmitted the patch.
Comment #11
jhodgdonThanks, looks good!
Comment #12
jhodgdonThanks again! Committed to 8.0.x.