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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

FileSize
675 bytes
Xano’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: drupal_2263059_1.patch, failed testing.

jhodgdon’s picture

Agreed 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:

 * To activate this feature, copy and rename it such that its path plus
- * filename is 'sites/yoursite.com/settings.local.php'. Then, go to the bottom
- * of 'sites/yoursite.com/settings.php' and uncomment the commented lines that
+ * filename is 'sites/*/settings.local.php'. Then, go to the bottom
+ * of 'sites/*/settings.php' and uncomment the commented lines that
  * mention 'settings.local.php'.

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!

Xano’s picture

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 *.

I'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.

Also, the */ in there is ending the comment! That is why it is getting "invalid PHP syntax". Oops!

Yup. That was my WTF of the day :')

jhodgdon’s picture

RE #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.

Xano’s picture

Understood. I appreciate the pointers :)

Bryn Vertesi’s picture

Status: Needs work » Needs review
FileSize
744 bytes

After 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.

jhodgdon’s picture

Status: Needs review » Needs work

That 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.

Bryn Vertesi’s picture

Status: Needs work » Needs review
FileSize
743 bytes

Thanks! I just made the fix and resubmitted the patch.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, looks good!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.0.x.

  • jhodgdon committed 00c5a64 on
    Issue #2263059 by Bryn Vertesi, Xano: Use example.com not yoursite.com...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.