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.
Using a default aegir installation for multisites I get the following errors:
foo$ drush omega-subtheme "foo" html5 --destination=foo.bar
foo$ The destination is invalid.
Debugging includes/omega_tools.drush.inc shows me that the function omega_tools_sites() returns an array containing "[0] => all" when sites.php is empty.
As a temporary fix, I added foo.bar to sites.php, but I still get the error. Using the fix in http://drupal.org/node/1338932#comment-5233574 lets me successfully create the subtheme in sites/foo.bar/themes/foo.
I still think omega_tools_sites() should let me use destination without these extra measures though.
Comment | File | Size | Author |
---|---|---|---|
#9 | 1344926.patch | 512 bytes | Paul Kim Consulting |
#3 | modified_to_list_sites_directory-1344926-3.patch | 849 bytes | jtse |
Comments
Comment #1
mengi CreditAttribution: mengi commentedI am having the same issue. Thanks for showing me the workaround, I will try it out.
Comment #2
GuyPaddock CreditAttribution: GuyPaddock commentedI, too, am having this issue.
Comment #3
jtse CreditAttribution: jtse commentedHere's a patch against the 3.x-dev branch. The patch determines the sites available by doing a directory listing instead of reading from the sites.php file (which, as mentioned by the original poster, may not be available).
Also, the patch addresses the issue referenced by perarnet: http://drupal.org/node/1338932
It's my first Drupal patch submission. Constructive feedback is welcomed!
P.S. Great theme!
Comment #4
fubhy CreditAttribution: fubhy commented´´
Lets see if we can come up with a better solution than reading out the directories on the system. There could be anything in there and it doesn't have to be a valid site folder.
Comment #5
jtse CreditAttribution: jtse commentedHi Fubhy,
Ideally, there should be a core function that returns a list of valid sites. We know from Aegir that the sites.php is not reliable source of valid sites. Do you (or anyone else) have other suggestions?
Thanks,
Jim
Comment #6
himerus CreditAttribution: himerus commentedI would agree that something like this needs to be integrated... I've done a ton of multisite builds without ever touching a sites.php...
Not sure the best solution though. I tend to sometimes just generate my theme to sites/all/themes, and then move it where i need it to go. not elegant, but there it is. :)
Comment #7
mengi CreditAttribution: mengi commentedPost #6 is what I ended up doing as well. Would be nice to have the 'destination' option work, but its just one extra command and only have to do it once per site, as Aegir will keep the subtheme in the right folder when migrating from platform to platform.
As a workaround, is it possible for Omega tools to have a 'move sub-theme' option? So it would install the subtheme in 'sites/all/themes' and then move the subtheme to 'sites/foo.bar/themes' afterwards? (Only for the lazy of course =)
Comment #8
jtse CreditAttribution: jtse commentedWhat exactly is the semantics of "--destination"? Is it a site subdirectory (c.f., drush site-install --sites-subdir ...) or a valid site installation (i.e., with settings.php)?
Perhaps the answer to this question should guide the proper solution.
Comment #9
Paul Kim Consulting CreditAttribution: Paul Kim Consulting commentedI've added a fix for this issue around sites.php.
Please see attached.
Comment #10
Paul Kim Consulting CreditAttribution: Paul Kim Consulting commentedComment #11
jlab CreditAttribution: jlab commentedPatch in #9 worked fine with my Aegir installation.
Comment #12
kristofferwiklund CreditAttribution: kristofferwiklund commentedI tested the patch in #9 and it solved my problems after I added them to sites.php
I have created 3 multi-site without any default site.
I would be nice not to have to type them in the sites.php file
Comment #13
joelcollinsdc CreditAttribution: joelcollinsdc commentedI updated the patch in #3 on a sandbox project i'm workign on.
https://www.drupal.org/sandbox/joelcollinsdc/1959140
This module seems unmaintained so I am having trouble merging all the requisite patches...
http://cgit.drupalcode.org/sandbox-joelcollinsdc-1959140/commit/?h=7.x-3...