Status update page is showing error
"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."
Have uploaded chosen-sprite.png chosen-sprite@2x.png chosen.css and chosen.jquery.min.js
As per the video http://www.youtube.com/watch?v=zeI0oInyok0
Have tried both minified.chosen.js and chosen.js
Have tried sites/all/libraries/chosen/chosen.jquery.min.js and
sites/all/libraries/chosen/chosen/chosen.jquery.min.js
as per http://drupal.org/node/1835358
This site uses a multi site BOA (Barracuda/Aegir/Octopus)
files were downloaded from git as zip and sftp up to site directory.
Comment | File | Size | Author |
---|---|---|---|
#38 | chosen-libraries_detect-1900564-38.patch | 982 bytes | hswong3i |
#3 | chosen-fix_library_load_1st_option-1900564-3.patch | 1.31 KB | DuaelFr |
#3 | chosen-fix_library_load_2nd_option-1900564-3.patch | 526 bytes | DuaelFr |
#1 | chosen-libraries-1900564-1.patch | 613 bytes | zambrey |
Comments
Comment #1
zambrey CreditAttribution: zambrey commentedYeah, I've got the same issue. Seems like new libraries support is broken.
First, according to #1835358: LIbrary requirement for 'chosen/chosen' it shouldn't use additional 'chosen' folder in libraries.
And second, version pattern is wrong.
I've prepared patch that should fix this two issues. It is based on Colorbox implementation of hook_libraries_info().
Comment #2
zambrey CreditAttribution: zambrey commentedstatus update
Comment #3
DuaelFrYour patch suggests that the person who installs the module has to put the content of the
chosen
subfolder into thesites/all/libraries/chosen
but it is clearly not the case. The good practice is to include the entire library in its folder.In our case, we will have to play with the
chosen
subfolder.I propose two patches (the maintainer can choose the one he prefers) :
- the first removes the
path
key and so, it prefixes all the included files- the second, highly inspired by #1, keeps the
path
key but uses thechosen.jquery.min.js
file instead of theVERSION
one.These patches are part of the #1day1patch initiative.
Comment #4
travelerttPatch from #1 chosen-libraries-1900564-1.patch worked for me. The other patches from #4 didn't work.
Using:
Chosen 7.x-2.0-alpha1+1-dev (2013-Feb-18)
Libraries 7.x-2.1
Drupal 7.21
Comment #5
DuaelFrMy patches only works if you extract the entire chosen library in your sites/all/libraries/chosen folder which is the good practice.
If you only extracted the chosen subdirectory my patches cannot work.
Comment #6
joep.hendrix CreditAttribution: joep.hendrix commentedComment #7
shadcn CreditAttribution: shadcn commentedWeird. I had this issue last week. And patch from #1 worked for me.
Today, on another site, chosen 7.x-2.0-alpha1 seems to be working fine, without any patch.
Comment #8
shadcn CreditAttribution: shadcn commentedLooks good on Simplytest as well. http://simplytest.me/project/chosen
Comment #9
micromegas CreditAttribution: micromegas commentedPatch #1 resolves the issue for me with 7.x-2.0-alpha1
Comment #10
Exploratus CreditAttribution: Exploratus commented#1 works for me as well with 2.0 alpha1.
Using Libraries 2.0 and extracted to /libraries/chosen/files go here...
Comment #11
joep.hendrix CreditAttribution: joep.hendrix commentedSince this issue is filed against 7.x-2.x-dev I think it would be more appropriate to test the patches against this version instead of the alpha version.
Comment #12
travelerttThat would explain why it wouldn't work for me. Patches should be set to the latest dev release under the guidelines (http://drupal.org/patch/submit)
Comment #13
micromegas CreditAttribution: micromegas commentedPatch from #1 is also working with latest 7.x-2.0-dev.
I tried patch #3 option 1 with the chosen/chosen library location, and it still did not find the library... refreshed the cache, no luck.
Comment #14
Exploratus CreditAttribution: Exploratus commentedI upgraded to Alpha2 and reapplied the patch and its working. Can we get this committed so we don't have to keep reapplying with every upgrade? :) Seems to work with alpha and Dev.
Comment #15
mike27 CreditAttribution: mike27 commentedPersonally I didn't have problem with Alpha 1 but after upgrading to Alpha 2, I encountered this problem. For the time, I need to downgrade to Alpha 1 until a fix comes up.
Thanks,
Mike
Comment #16
mike27 CreditAttribution: mike27 commentedFor anyone interested:
My problem was that until now I used jquery.js file instead of min.js
Alpha 2 uses jquery.min.js by default. So, if you delete jquery.min.js file it doesn't recognize the library as Alpha 1 release did.
I used jsmini.com to compress the jquery.js file (and keep any changes that I had implemented) and then I used patch #1 which indeed works (only for the jquery.min.js file).
Comment #17
vflirt CreditAttribution: vflirt commentedHi all ,
what i used to make it work :
create folder sites/all/libraries/chosen/chosen
extract the files in the above folder
change chosen_libraries_info as follows:
that made it work.
Hope this helps , when libraries is checking for the version file it is not using the 'path' property so i had to add it.
Comment #18
DuaelFrvflirt it is exactly what I made in my first patch in #3.
I really think we should follow the Libraries API best practices and use the full library instead of extracting its chosen subfolder.
Comment #19
dddave CreditAttribution: dddave commentedIs this really needed? I just tested with the latest dev of the module and uploaded the whole library into libraries/chosen without any issues.Sigh. Just noticed that this module has a dev that is significantly older than the alpha. How lovely.
Comment #20
zambrey CreditAttribution: zambrey commentedWell, clean alpha2 doesn't work for me. Maybe this is some kind of environment / PHP issue.
I'm using WAMP server with PHP 5.3.13 version.
I've got this error on Status Report page:
I've tried both libraries/chosen and libraries/chosen/chosen paths.
Comment #21
dddave CreditAttribution: dddave commentedI have a test-instal working without any patching. Just sayin'.
Set the version to alpha2 because this is the latest version out there.
Comment #22
zambrey CreditAttribution: zambrey commentedAs far as I know they are the same and all patches should go against dev version. So setting back to dev.
I guess now it's up to the maintainer to choose patch either from #1 or #3.
My patch is additionally changing library path as per #1835358: LIbrary requirement for 'chosen/chosen' issue which is closed but apparently not fixed.
Setting to RTBC based on comments and to grab maintainer attention.
Comment #23
Manuel Garcia CreditAttribution: Manuel Garcia commentedUsing latest recomended release 7.x-2.0-alpha2 (which is broken afik).
Using the patch http://drupal.org/files/chosen-fix_library_load_1st_option-1900564-3.patch from #3 by DuaelFr, fixes the problem. You should have the files placed like sites/all/libraries/chosen/chosen.jquery.min.js etc.
Comment #24
Manuel Garcia CreditAttribution: Manuel Garcia commentedactualy make that path
sites/all/libraries/chosen/chosen/chosen.jquery.min.js
Comment #25
dddave CreditAttribution: dddave commentedHave we established an explanation why it is working for me without patching and for others not? Can we make sure that the library was correctly installed in the first place? #23/#24 suggest that this might be the real issue.
Comment #26
shadcn CreditAttribution: shadcn commentedYep. Actually both versions alpha and dev are working on simplytest.me.
http://simplytest.me/project/chosen/7.x-2.x
http://simplytest.me/project/chosen/7.x-2.0-alpha2
Comment #27
kait CreditAttribution: kait commentedRecommended version works for me, but I had to make sure Chosen was placed in
sites/all/libraries/chosen
the same way it is in the zip file I downloaded from GitHub. Onlychosen
directory and VERSION file are required insidesites/all/libraries/chosen
.If you copied everything from the zip to
sites/all/libraries/chosen
, then you should have no problems.Hope it helps.
tl;dr - chosen structure needs to be like this:
Comment #28
vflirt CreditAttribution: vflirt commentedhi,
what we all missed for this to work is the VERSION file in sites/all/libraries/chosen as you have it. That is the reason it is working. As you see in my comment all i said was that i changed the version file from "VERSION" to chosen/chosen.jquery.js as it was not described well how to install the module.
As all it seems that is just not clear documentation about installing the module and not a code change that is to be done inside :)
Kind Regards,
Dobromir
Comment #29
kait CreditAttribution: kait commentedI concur @vflirt, installation instructions need to be more clear about this. But I do think the code needs to be changed as well. Extracting the whole archive to libraries directory shouldn't be mandatory. Or at least the version info should come from the javascript file. What do you (or anybody else) think, should it be changed?
Comment #30
scuzzyworks CreditAttribution: scuzzyworks commentedPut VERSION back in the libraries/chosen folder, flushed cache and now I'm in business. Documentation needs to be updated.
Comment #31
xbrianx CreditAttribution: xbrianx commentedYeah man, the documentation needs updating stat.. Watching the you tube video it says to only copy the js file and that's it.. This was driving me crazy. Put the VERSION file in libraries/chosen/ and the rest of the files in libraries/chosen/chosen/
Comment #32
Mithrandir CreditAttribution: Mithrandir commentedReading this thread, I wonder if people have realised that the Chosen javascript library has changed recently, so there is no VERSION file anymore.
Either the module should update the library detection and file placement code, or the make file should not just point to the master git branch, but to the 0.9.15 release that is the latest functioning one, as far as I can see.
Comment #33
Dave ReidI think this issue and #2021639: Chosen directory renamed to public from chosen, js cannot be added are likely trying to solve the same thing. Patches in 2021639 are looking cleaner than the latest ones here though.
Comment #34
shadcn CreditAttribution: shadcn commentedHi everyone
I'm a bit busy with work right now. Anyone want to help maintain chosen? I'll add you as co-maintainer.
Thanks.
Comment #35
Dave Reid@arshadcn: If you need assistance I can help get a new release out that fixes the major blockers and outstanding issues.
Comment #36
shadcn CreditAttribution: shadcn commentedWe couldn't ask better. Added you as co-maintainer Dave. Thanks ^^
Comment #37
conniemh CreditAttribution: conniemh commentedIt took me quite a while to figure this out, but after I uploaded the chosen library to my ../sites/all/libraries directory I added a text file named VERSION that contains only the version number (in my case the file contains 0.13.0) and the Drupal module was finally able to recognize the library. Hope this helps others. (...and maintainers, please let me know if this is not a good thing to do for some reason)
Cheers,
Connie
Comment #38
hswong3i CreditAttribution: hswong3i commentedUpdate detection for chosen library v0.13.0 via chosen-7.x-2.x-dev.
Comment #39
jwjoshuawalker CreditAttribution: jwjoshuawalker commented#38 worked for me.
Unrelated note: Chosen doesn't seem to work w/ jQuery update set to version 1.5.
Comment #40
brentratliff CreditAttribution: brentratliff commented#38 worked for me as well in order to recognize the library. The module, however, is not working at all. I have tried jquery update set to 1.5,1.7, and 1.8. Chosen is never applied regardless.
Comment #41
bwoods CreditAttribution: bwoods commentedI'm using the latest dev version and the patch from #38. On load, I see this javascript error:
ReferenceError: settings is not defined
The issue is "settings" is spelled wrong on line 3:
attach: function(context, setings) {
Making this correction seems to work for me.
EDIT: Looks my suggestion was listed as a separate bug and committed already - https://drupal.org/node/2040753
Comment #42
Hydra CreditAttribution: Hydra commented+1 RTBC
I confirm that the latest dev together with the typo patch in #2040753: bug in chosen.js line 4 make it work again. This should be committed immediately!
Comment #43
dalin+1 RTBC
Patch from #38 works with Chosen v0.14.0 + jQuery 1.7.
Comment #44
brentratliff CreditAttribution: brentratliff commentedSolved my issue as well with Chosen v0.13.0 + jQuery 1.7.
+1 RTBC
Comment #45
xy61qt5 CreditAttribution: xy61qt5 commentedBug might be solved when you use 0.14.0 + jQuery 1.7 and v0.13.0 + jQuery 1.7. It must be check these version must be work together with other addons.
Comment #46
brentratliff CreditAttribution: brentratliff commentedReality is jQuery 1.7 may break plenty of addons. It's infeasible to check them all. It's better to just list jQuery 1.7 as a requirement as the Chosen javascript library is not going to be handcuffed to jQuery 1.5 as is Drupal core.
Comment #47
joep.hendrix CreditAttribution: joep.hendrix commentedComment #48
Hydra CreditAttribution: Hydra commentedOkay, I thought a bit about this issue and decided to not go this solution. I agree with #33. Since their is a 1.0.0 release of chosen, we will use this. Also we switch from hook_library_info to hook_library with a clean version definition of 1.0. This should still work with the core version of Drupal jQuery.
The latest dev version is now including these improvments, hope this solved this issue :)
Comment #49
DenisVSDev version works fine for me.
Comment #50
Anonymous (not verified) CreditAttribution: Anonymous commentedUpdating to dev and applying patch in #38 fixed this for me.
Comment #51
999csharp CreditAttribution: 999csharp commentedYes, I've just created the subfolder called chosen, copied the files in there!!! The module has enabled lovely now. Now its time to have a play with - can't wait - it looks really good.
Comment #52
JohnnyW CreditAttribution: JohnnyW commentedMy issue was that chosen folder was named Chose with a capital C instead of lowercase. On localhost with WAMP no problem, but Centos 6 wanted to see a lowercase 'c' on the folder named chosen.