Created a new Drupal 7 site today and added chosen.
When I tried to enable it, I get:
$ drush pm-enable chosen --yes
Module chosen doesn't meet the requirements to be enabled.
You need to download the Chosen JavaScript file and extract the entire contents of the archive into the sites/all/libraries directory on your server.
When I try to get the plugin:
$ drush chosenplugin
Command chosenplugin needs the following module(s) enabled to run: chosen.
The drush command 'chosenplugin' could not be executed.
Now what?
Comments
Comment #1
dsquaredb commentedI had the same problem but was able to install Chosen by renaming the folder for the jQuery plugin in Libraries to chosen (/sites/all/libraries/chosen) and by downloading and enabling the jQuery Update module which is a dependency. The drush command to install the plugin did not work for me either.
Comment #2
harlor commentedUrgh, this seems to be a general problem with the behavior of drush commands... It seems that a drush command automaticly is dependent on the module it belongs to. So as long as you don't activate the module you can't use the
drush chosen-plugincommand.But as you mentioned you can't activate the module until you have the libraray.
This patch lets users install the module without having the chosen library. We have added warings at every chosen output either.
Maybe someone knows how to register drush commands without dependdency on the module it self... that would be much nicer!
Comment #3
hydra commentedOkay, I realy don't like that, but I don't see any other way how to solve that. THanks for the patch Harlor!
Pushed to 7.x-2.x http://drupalcode.org/project/chosen.git/commit/32dcc6d