backdrop-contrib / backdrop-drush-extension

A set of commands and boot class for Drush and Backdrop CMS.
GNU General Public License v2.0
13 stars 18 forks source link

Allow downloading to '/modules' within multisite setup #197

Closed ghost closed 4 years ago

ghost commented 4 years ago

This is another multisite-related issue. Currently, I cannot run drush dl [MODULE] from the /modules folder (in order to make a module globally available to all sites). I get the following:

packweb:/var/www/backdrop1/modules$ drush dl -v webform
Initialized Backdrop 1.13.3 root directory at /var/www/backdrop1
Initialized Backdrop site backdrop1 at .
Drush command terminated abnormally due to an unrecoverable error.

It'd be nice if it downloaded to /sites/[SITE]/modules if you ran it from within a site's folders, or defaulted to downloading to /modules otherwise.

I'm not sure if my running the command from outside a site's folder caused the abnormal termination, or if something else caused that which then prevented the download (which might otherwise have worked)... Marking as a question until I know whether this is a bug report or a feature request.

ghost commented 4 years ago

Marking this as a bug as I was able to do the following:

ghost commented 4 years ago

It just occurs to me that Backdrop is quite different to D7 in how its multisite system works...

In Backdrop, if you don't have a multisite setup then you're using the settings.php in the root directory. If you do have a multisite setup then you're using sites/sites.php and the settings.php files in the various sites/ directories.

In D7, regardless of whether you have a multisite setup or not, you're using settings.php in one or more of the sites/ directories.

Therefore, as far as Drush is concerned, the different between multisite and non-multisite in D7 is negligible. However in Backdrop it's quite a big difference. It seems then that Backdrop's Drush extension will need quite a bit of re-writing to properly support Backdrop's multisite setup.

I will try my best to see if I can contribute to this effort, but I'm finding Drush quite a hard beast to tame. Maybe a 'Drush Lite' for Backdrop is in order...

serundeputy commented 4 years ago

there is the b that is a command line helper for backdrop from scratch if that is what you mean by drush lite.

ghost commented 4 years ago

@serundeputy As I'm now focused on b development I'm not going to get back to this. Feel free to close if no one else needs multisite support, or unassigned me if not 🙂

serundeputy commented 4 years ago

@BWPanda thanks! totally understandable.

Closing as there is no dev bandwidth for this currently; we can re-open or start fresh if dev cycles and priorities change in the future.