As I mentioned in #624856: Multisite: How to specify ~/sites/mydomain.com.mysite in the command-line options?, site aliases do not work for sites where the drupal root is in some sub-path rather than directly at the root of the web server. For example, if the drupal site is at http://domain.com/drupal, then the uri is also "domain.com/drupal", but the settings.php file is located in "domain.com.drupal". The site alias code expects that the uri should be located in a folder with the same name as the uri, that is "domain.com.drupal". The fact that the uri is different causes minor problems; however, most things still work.
Similar problems occur if you actually put the 'http://' on the front of the uri in a site alias. This should also be allowed.
I will post a patch to fix this here once I have one ready.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | drush-HEAD-2009_11_08.patch | 13.73 KB | greg.1.anderson |
| #4 | drush-HEAD-2009_11_08.patch | 14.62 KB | greg.1.anderson |
| #2 | drush-HEAD-2009_11_07.patch | 13.93 KB | greg.1.anderson |
| #1 | drush-HEAD-2009_11_06.patch | 14.16 KB | greg.1.anderson |
Comments
Comment #1
greg.1.anderson commentedPatch attached. Makes site aliases work correctly with sites where the site directory might contain a port or path component.
Also,
drush sa defaultwill now print out information about the default site -- that is, whichever site is set with -l or --uri. This is useful for setting up site aliases for the first time using --root, --uri and --full. "default" can also be used in other contexts, such as drush sync and drush sql sync.Comment #2
greg.1.anderson commentedPatch updated.
I realised that "default" should be reserved to mean the default Drush site, so I changed the reserved word to "current" (i.e.
drush sa current) to indicate the current site specified by -l / --uri.Comment #3
moshe weitzman commentedlets omit the commented out code
looks same as dirname($site_settings_file). am i wrong?
Comment #4
greg.1.anderson commented1. Whoops. Removed.
2. Almost; it is the same as basename(dirname($site_settings_file)). I changed the implementation to that; the previous implementation was taken from another part of Drush. My favorite kind of code is tested code, but using the platform libraries is even better.
Comment #5
greg.1.anderson commentedThe previous patch accidentally included a modified version of the 'drush' script. Use this patch instead.
Comment #6
moshe weitzman commentedcommitted. thx.