Hello,
The 11.5 section explains how to install a theme using Drush:
drush en mayo
This Drush command will enable the MAYO theme when using Drush version 8, as stated in the official documentation for the drush pm-enable command (which has an alias: drush en).
But using Drush version 9 with the above command generates an error:
Unable to install modules mayo due to missing modules mayo
To enable a theme in Drush version 9, the drush theme:enable command (which has an alias: drush then) is requested:
drush then mayo
The User Guide may state which Drush version is being used in order to prevent errors like the one mentioned above.
Regards,
Gilles
Comments
Comment #2
jhodgdonThanks for this issue! Good idea to mention the Drush version too. Maybe we should actually give both commands there, so it would say something like
If you are using Drush version 9, the command is
...
And in Drush version 8, the command is
...
To find which version of Drush you are running, the command is:
...
Comment #3
eojthebraveI'm a little bit hesitant to list multiple variations of the same command for fear that 1.) we would need to do it in more places than just this, and 2.) these types of things have a tendency to bloom into hard-to-parse content as more and more variations are added. My personal preference would be to stick to the commands for whatever the current stable version of Drush is. And then maybe provide information about this policy on https://www.drupal.org/docs/user_guide/en/install-tools.html where we could say something like, "Commands used throughout the guide are for the latest stable release of the Drush software. For help with previous version see ..." and provide a link to the Drush docs.
Comment #4
jhodgdonGood point, and excellent plan!
Comment #5
gillesbailleuxIn a recently updated d.o documentation node titled Update core via Drush, Martin Postma (aka lolandese) writes:
I put that in perspective with @eojthebrave's recommendation which is "to stick to the commands for whatever the current stable version of Drush is" (and it is Drush 9.6.2 today).
Comment #6
jhodgdonA few months ago, we updated the User Guide (at least in the source... not sure it is up on drupal.org yet) so that we don't suggest using Drush to download things (including updated module files). We are only recommending Composer.
Comment #7
jhodgdonHere's the issue where we updated the User Guide to Drush 9, and stopped saying you could download stuff with Drush instead of Composer. Check out the discussion if interested in the reasoning.
Meanwhile, here is a patch. Thoughts?
Comment #8
jhodgdonOops, forgot the patch.
Comment #9
gillesbailleuxThank you for adding
Because I do not have the skills to evaluate the need to use or do not use Drush 8 or Drush 9, I may only share my experience: after typing
composer update, I always perform adrush updb.Comment #10
jhodgdonThis topic is about installing a theme initially, not updating a theme, and not using composer (those topics are elsewhere). When you install a theme or module for the first time, there is no need to update the database. The topics about updating core, modules, and themes do say to update the database later.
Comment #11
baluertlNow tested, patch #8 applies cleanly on current HEAD. I compared the changes with
--word-diffand seems reasonable the inserts of referencing to latest stable versions, so marking this issue as RTBC.Also, updating it's version number, as it was not solved on 8.x-6.0 branch.
Comment #12
baluertlComment #13
jhodgdonThanks again! Committed, and update to email list going out shortly.