It seems that whenever I try to install an install profile that has jquery colorpicker required it throws an error. The only thing I could find is that jquery color picker is checking for the location of the colorpicker javascript based on $path. It populates path from
$path = drupal_get_path('module', 'jquery_colorpicker') . '/';
This appears to be a problem when running the .install file as part of an install profile because the path function to the module shouldn't be populated yet. This causes it to look for colorpicker in /colorpicker/ (directory root) instead of the current active folder or even the correct install location. I'm not sure how to resolve this or I'd submit a patch with this but wanted to document the issue and see if anyone else has experienced this.
Comments
Comment #1
plopescHello.
You're right. After your message I started to look for that problem and I found fort example #1027600: call to drupal_get_path() in hook_requirements() fails during install profile or #325831: url() in hook_requirements breaks install profiles, where you can find the same problem.
However, I didn't take into account before. If you want to commit a patch, I would be very grateful. otherwise, I'll try to fix it as soon as possible.
Regards
Comment #2
btopro CreditAttribution: btopro commentedI think on install you could do a look up for either profiles/... Whatever or sites/all/... Since it'll be relative paths. I'll look into it a bit further today and try to submit a patch.
Comment #3
btopro CreditAttribution: btopro commentedsuper easy fix. Add this:
right after line 101
Comment #4
plopescHello
Thanks for your effort!!
I'd like to ask you a question about your install profile...
If you try to put the colorpicker folder in the libraries folder instead of the module folder, it works fine?
I think that the best option could be remove that option and work only from the libraries folder.
Could you test it from your install profile?
You should force that the libraries module is installed before, please add the line
to the jquery_colorpicker.info file
Thanks a lot!!
Comment #5
btopro CreditAttribution: btopro commentedAre you saying try putting it there w.o. my patch or with the patch? I'll be building the install profile soon for a release so just let me know which way you'd like me to go with it.
Comment #6
lkujala CreditAttribution: lkujala commentedI think this issue is causing other modules to fail... in particular the Fusion Theme. when I try to configure the fusion theme the color settings block is missing and an error message is logged:
sites/all/modules/jquery_colorpicker/colorpicker/images/select.png page not found
OR
/sites/all/modules/jquery_colorpicker/colorpicker/js/colorpicker.js?j page not found
It sure looks like the error in the url is caused by this problem.
So, how do I try out the suggested patch? Other than editing the code, what else do I need to do to update the module?Quickfix :: CREATE the colorpicker folder manually and MOVE the js folder into the colorpicker folder...
Correction:: COPY the js folder into the colorpicker folder... there are links to both paths.... :(
works until the next release :)Comment #7
btopro CreditAttribution: btopro commentedminor code change in #3 fixed this issue for me.
Comment #8
plopescHello
I was really busy last weeks.
I'll try to release a new version that fixes this bug this week.
Regards
Comment #9
plopescIt should be fixed in last commit.
You can download the 6.x-2.3 release.
Thanks for your collaboration.
Regards