Comments

hefox’s picture

StatusFileSize
new592 bytes

VERSION file has disappeared, not sure where the equivalent is

wbobeirne’s picture

Status: Needs review » Reviewed & tested by the community

Works great for me. Minus points to maintainer of Chosen for switching that up.

Mołot’s picture

OK, worked for me too.

Why patch removes version array?

girishmuraly’s picture

Backward compatibility is lost though - the patch applied but the module is not working as before this folder structure alteration.

Mołot’s picture

@girishmuraly - could you tell what's lost? I had no chance to see it working before, just installed it when it was broken. Removal of 'version arguments' seems questionable, but that's all I can tell.

girishmuraly’s picture

I had implemented Chosen for a dropdown selector before the github folder move and this is not working now on just 2.0-alpha2 with the above #1 patch.

I got the javascript error: "TypeError: $(...).chosen is not a function" in the console.

However, pinning the git repo to a version helped - i.e. the patch in https://drupal.org/node/2021641 on 2.0-alpha2.

Mołot’s picture

@girishmuraly - that was the error I got before applying patch, applying it solved it for me... "chosen is not a function" because chosen javascript failed to load and patch tries to fix just that - succesfuly in my case.

girishmuraly’s picture

Strange - are you using 2.0-alpha2 or 2.x?

Mołot’s picture

2.0-alpha2 with chosen library straight from it's repo.

brockfanning’s picture

#1 is working for me, thanks!

dave reid’s picture

I think we should be able to do something like https://drupal.org/files/chosen-fix_library_load_2nd_option-1900564-3.patch for catching the version now.

attheshow’s picture

For anyone who doesn't want to maintain a patched version of the module, another temporary fix is to download version 0.9.15 which includes both the "chosen" directory and the "VERSION" file. You can still get that version here: http://plugins.jquery.com/chosen/.

dave reid’s picture

I think we may need to hold off on this change. The latest version of Chosen has a compatibility bug with jQuery 1.4 which makes it completely unusable: https://github.com/harvesthq/chosen/pull/1311

hefox’s picture

#2021641: Use tagged version of library in make -- at least for tagged releases? is talking about associating releases with tagged version (e.g. 0.9.15) of the library, so release can at least be stable

jyee’s picture

Looks like the issue from davereid (#13) above was merged, so the latest revision of Chosen can be used.

messiahcide’s picture

Version: 7.x-2.x-dev » 7.x-2.0-alpha2
Assigned: Unassigned » messiahcide

Hello.

I've been having a difficult time getting this module to work. I keep receiving the message "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."

I've tried the patch from #1 but it didn't work for me. I got the Chosen Javascript via the status report link and uploaded it.

I'm using:
Chosen 7.x-2.0-alpha2
Libraries 7.x-2.1
Drupal 7.22

Is there a step I missed in this process?

messiahcide’s picture

Assigned: messiahcide » Unassigned
jyee’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev

Please don't change the version of issues, unless you have a valid reason to do so. See the issue queue manual for info about selecting the version.

As to your particular problem, try using the latest git revision of this module (with the patch applied) and the latest git revision of the Chosen library.

dave reid’s picture

Do we need to add an empty update function to get the libraries API module cache cleared to account for this change?

Mołot’s picture

update.php contains:

// No updates to run, so caches won't get flushed later. Clear them now.
drupal_flush_all_caches(); 

So, as far as I understand, empty update function is not needed.

dave reid’s picture

Adding an empty update function is a warning that the user needs to run update.php. I know a lot, lot of site installs who don't actually run update.php unless they have updates to run, which is a sad reality.

Mołot’s picture

OK, I admit I only looked from computer engineering POV, not social engineering one. With that explanation it seems to be a good idea.

tobby’s picture

StatusFileSize
new338 bytes

I've found that, similar to issue #2021641, the version of the Chosen library makes a difference. After v0.10.1, the jquery files disappear from the public directory, which causes the patch in #1 to stop working for me again. This patch pins the library to v0.10.1 which, along with the patch in #1, keeps my version of Chosen module working.

dave reid’s picture

Status: Reviewed & tested by the community » Needs work

At this point we should switch to using the zip releases of Chosen then, which include the generated files.

kim.pepper’s picture

Status: Needs work » Needs review
StatusFileSize
new409 bytes

Here's a patch that uses get instead of git.

kim.pepper’s picture

StatusFileSize
new409 bytes

Oops. That release has the 'public' folder. This is the last release with the 'chosen' folder.

hydra’s picture

Status: Needs review » Closed (fixed)

Okay I modified this, till Version 1.0 of chosen has been released.
Thanks everyone for working on this!

http://drupalcode.org/project/chosen.git/commit/0b1f538

hefox’s picture

Status: Closed (fixed) » Fixed

Fixed will be marked as closed (fixed) in 2 weeks by a bot; allows subscribers to notice it being fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

axlroach’s picture

I was having this same problem with chosen 1.0. Just in case it helps anyone else, I found the solution in comment #2 here: https://drupal.org/node/2089973. Essentially, instead of downloading the chosen jquery plugin and extracting it at sites/al/libraries, let drush do it for you: use 'drush chosenplugin'.