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.
When "composer" downloads "jquery_colorpicker" library it generates it's contents in "{root}/vendor/*" not in "{jquery_colorpicker_module}/vendor" so the code to replace in "jquery_colorpicker.install" should be:
if(!file_exists(DRUPAL_ROOT . '/vendor/jaypan/jquery_colorpicker/js/colorpicker.js'))
Also the library created in "jquery_colorpicker.libraries.yml" it's wrong.
To workaround this I have copied the library in root to this module root folder.
Comments
Comment #2
Jaypan CreditAttribution: Jaypan at Jaypan commentedCan you please give me some more information about how you installed it? Did you run composer update from the module root, or from somewhere else?
Thank you.
Comment #3
bdominguez CreditAttribution: bdominguez commentedI ran "composer drupal-update" from drupal root folder.
Comment #4
Jaypan CreditAttribution: Jaypan at Jaypan commentedThank you for that.
I've decided to drop composer as an installer for this module, as it turns out only folders created by composer should be in the /vendor folder, thereby limiting the users of this module to those who know how to use composer.
I've released a new version of the module (8.x-1.0-rc2) that will look for the module in DRUPAL_ROOT/libraries/jquery_colorpicker, so you'll need to move your library from /vendor/jaypan/jquery_colorpicker when updating form RC1 to RC2. Sorry about the hassles.