As Drupal 8 now required the sites/sites.php by Change notice http://drupal.org/node/1792924 done in D7 #1055862: Require sites.php to opt-in for multi-site support/functionality for performance reasons

Documentation issue: #1018324: Adjust documentation for aliased multi sites to include more info and examples.
Open issue about removal of example.sites.php : #1757536: Move settings.php to /settings directory, fold sites.php into settings.php

We can implement this for both Drupal 8 and Drupal 7 I guess.

Is this ok for Drupal 6?

CommentFileSizeAuthor
#1 hosting-sites-php-2008106-1.patch429 bytesclemens.tolboom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clemens.tolboom’s picture

Status: Active » Needs review
FileSize
429 bytes
clemens.tolboom’s picture

Doing echo platforms/*/sites/sites.php | xargs tail -n10 the addition default is not added automatically. Only after a site edit.

Is that also true when changing the vars hosting_alias_subdomain, hosting_alias_automatic_www and hosting_alias_automatic_no_www (which are used just a few lines above the new line from the patch)?

helmo’s picture

Yes, a verify task must run to update the sites.php file.

This does add the primary site uri to the "Automatic domain aliases: " list on the node page. Which could be confusing...

clemens.tolboom’s picture

We could rephrase "alias" into "URIs" maybe

"Domain aliases: " on site node-view into "Domain URIs"

"Automatic domain aliases" on site-edit into "Automatic domain URIs"

clemens.tolboom’s picture

Regarding #2

changing the vars hosting_alias_subdomain, hosting_alias_automatic_www and hosting_alias_automatic_no_www

on admin/hosting/aliases it is said

Settings made here do not take effect automatically for existing sites.

So does this issue needs a hook_update_N or should we file a new issue "When to verify all sites?"

anarcat’s picture

Doing echo platforms/*/sites/sites.php | xargs tail -n10 the addition default is not added automatically. Only after a site edit.

I don't understand that sentence.

Also, I think it's a good idea to rename "aliases" to "URIs" but it's a big change and should be moved to a separate issue. Otherwise i like the simplicity of the patch, but it would need testing.

clemens.tolboom’s picture

@anarcat #6 the settings files are not changed automatically by this patch. Only when verifying a site Iguess. So how do we (and should we?) make sure D7 (+D8) platforms have their sites/sites.php filled in as it will benefit D7 sites as mentioned in the summary.

Does this needs a hook_update_N?

I have some reserves now as I'm not sure what will happen with the non-alias value regarding writing to the vhosts?

Do we have tests for Alias? Then we need a test!

clemens.tolboom’s picture

I've used this for #1194602: [meta] Support the hosting of Drupal 8 sites but am still unsure whether this is needed. The file sites/sites.php is not filed by it and Drupal 8 is installed and running.

clemens.tolboom’s picture

Issue summary: View changes

Updated issue summary.

clemens.tolboom’s picture

clemens.tolboom’s picture

Hmmm ... according #2168617: INSTALL.txt has not been updated to match multisite functionality change the _file_ sites/sites.php only needs to exists.

I leave it to @helmo to "won't fix" this issue.

ergonlogic’s picture

If there's a performance gain by using sites.php, then IMHO we should implement it by default for D7+. Reading the core issues, though, I'm not convinced there is (yet).

helmo’s picture

Status: Needs review » Closed (works as designed)

New status says it all.