brian at rl: ~/Sites/drupal-7.18/sites/realityloop.com
→ drush omega-subtheme "Realityloop" --destination=realityloop.com
The destination is invalid.

CommentFileSizeAuthor
#5 sites.patch934 bytesfubhy

Comments

realityloop’s picture

using Drush 5.8 on OSX as per configuration in post here:
http://realityloop.com/blog/2012/07/03/nginx-mariadb-php-aegir-mac-os-x-...

fubhy’s picture

Status: Active » Closed (works as designed)

Should be --destination="sites/realityloop,com". In 4.x we also support profiles or parent themes as destination (e.g. --destination="profile/standard" or --destination="theme/foo" (put's it UNDER the parent theme named "foo")).

fubhy’s picture

Note: You can use "drush help | grep omega" to get the list of omega commands and "drush help omega-subtheme" to get a detailed description of the omega-subtheme command.

realityloop’s picture

Status: Closed (works as designed) » Active

Ah, that makes sense, unfortunately I've tried all the iterations I can think of and I'm still getting the error..

brian at rl: ~/Sites/drupal-7.18/sites/realityloop.com
→ ls -la
total 216
dr-xr-xr-x  10 brian  staff    340 23 Dec 13:48 .
drwxr-xr-x   8 brian  staff    272 23 Dec 12:07 ..
-r--r-----   1 brian  staff  99847 23 Dec 13:51 drushrc.php
drwxrwx---  11 brian  _www     374 24 Dec 10:39 files
drwxrwsr-x   5 brian  staff    170 23 Dec 12:15 libraries
-rw-r--r--   1 brian  staff    138 23 Dec 13:50 local.settings.php
drwxrwsr-x   4 brian  staff    136 23 Dec 12:32 modules
drwxrwx---   4 brian  _www     136 23 Dec 12:07 private
-r--r-----   1 brian  _www    3150 23 Dec 13:51 settings.php
drwxrwsr-x   4 brian  staff    136 24 Dec 10:42 themes
brian at rl: ~/Sites/drupal-7.18/sites/realityloop.com
→ drush omega-subtheme "Realityloop" --destination="sites/realityloop.com"
The destination is invalid.                   [error]
brian at rl: ~/Sites/drupal-7.18/sites/realityloop.com
→ drush omega-subtheme "Realityloop" --destination="sites/realityloop.com/themes/"
The destination is invalid.                   [error]
brian at rl: ~/Sites/drupal-7.18/sites/realityloop.com
→ cd themes 
brian at rl: ~/Sites/drupal-7.18/sites/realityloop.com/themes
→ ls -la
total 0
drwxrwsr-x   4 brian  staff  136 24 Dec 10:42 .
dr-xr-xr-x  10 brian  staff  340 23 Dec 13:48 ..
drwxrwsr-x   7 brian  staff  238 23 Dec 12:16 fusion
drwxrwxr-x  23 brian  staff  782 23 Dec 14:17 omega
fubhy’s picture

Version: 7.x-4.0-alpha2 » 7.x-4.x-dev
Status: Active » Needs review
StatusFileSize
new934 bytes

Please try the latest dev (4.x-dev) preferably directly from git or apply the attached patch and see if that fixes it for you. If it doesn't, then please read http://drupal.org/documentation/install/multi-site ... The drush script only allows you to choose valid /sites destinations which have to be registered in /sites/sites.php (@see that documentation page that I linked).

Status: Needs review » Needs work

The last submitted patch, sites.patch, failed testing.

realityloop’s picture

have drush cc drush, drush cc all, and still getting the same errors.

content of my sites.php file

<?php 
/**
 * @file
 * Configuration file for Drupal's multi-site directory aliasing feature.
 *
 * Drupal searches for an appropriate configuration directory based on the
 * website's hostname and pathname. A detailed description of the rules for
 * discovering the configuration directory can be found in the comment
 * documentation in 'sites/default/default.settings.php'.
 *
 * This file allows you to define a set of aliases that map hostnames and
 * pathnames to configuration directories. These aliases are loaded prior to
 * scanning for directories, and they are exempt from the normal discovery
 * rules. The aliases are defined in an associative array named $sites, which
 * should look similar to the following:
 *
 * $sites = array(
 *   'devexample.com' => 'example.com',
 *   'localhost.example' => 'example.com',
 * );
 *
 * The above array will cause Drupal to look for a directory named
 * "example.com" in the sites directory whenever a request comes from
 * "example.com", "devexample.com", or "localhost/example". That is useful
 * on development servers, where the domain name may not be the same as the
 * domain of the live server. Since Drupal stores file paths into the database
 * (files, system table, etc.) this will ensure the paths are correct while
 * accessed on development servers.
 *
 * To use this file, copy and rename it such that its path plus filename is
 * 'sites/sites.php'. If you don't need to use multi-site directory aliasing,
 * then you can safely ignore this file, and Drupal will ignore it too.
 */

/**
 * Multi-site directory aliasing:
 *
 * Edit the lines below to define directory aliases. Remove the leading hash
 * signs to enable.
 */
$sites = array (
  'realityloop.ld' => 'realityloop.com',
);
fubhy’s picture

Status: Needs work » Active

This: realityloop.ld is your --destination then! So you would go --destination="sites/realityloop.ld". I will probably add some better error reporting code for when the destination is invalid (e.g. show all available "sites" when "sites/" is used or show all available profiles when "profile/" is used or show all available base theme when "theme/" is used.

Furthermore I am wondering if we should use the array value instead of the array key for $sites.... Does that make more sense? I thought going with the array key was saner. Thoughts?

fubhy’s picture

Can you confirm that this works? I just tagged alpha3 which includes the fix for this. I will add more verbose error messages later.

fubhy’s picture

Status: Active » Fixed

Alright, I added verbose error messages (user prompt) when an invalid destination is given... The destination syntax was changed to look like this:

--destination="site:example.com" / --destination="theme:bartik" / --destination="profile:standard"

Status: Fixed » Closed (fixed)

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