Status report:
The version of the Colorbox plugin library could not be detected. You need to download the Colorbox plugin, extract the archive and place the colorbox directory in the sites/all/libraries directory on your server.

Problem:
Regex of colorbox_libraries_info() patern.

Workaround:
Replace 'pattern' => '@(?i:Colorbox) v([0-9\.a-z]+)@', with 'pattern' => '@(?i:Colorbox)[ |v]([0-9\.a-z]+)@',.

Below is the patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ItangSanjana’s picture

ItangSanjana’s picture

Status: Active » Needs review
cfox612’s picture

Tested and works. Keeping status as is until someone else verifies.

mxh’s picture

Works for me as well.

ItangSanjana’s picture

FileSize
498 bytes

Here is the proper regex (with or without the "v") before the plugin's version. Sorry was in a hurry :(
E.g. for Colorbox v1.5.14 or Colorbox 1.5.14

JGReidy’s picture

Patch worked for me.

drush .make file:

projects[colorbox][version] = "2.7"
projects[colorbox][patch][] = "http://www.drupal.org/files/issues/Colorbox_plugin_not_detected-2336341-..."

libraries[colorbox][download][type] = "get"
libraries[colorbox][download][url] = "https://github.com/jackmoore/colorbox/archive/master.zip"
libraries[colorbox][destination] = "libraries"
libraries[colorbox][directory_name] = "colorbox"

clemens.tolboom’s picture

Title: Colorbox plugin Not detected » Colorbox plugin Not detected

Shouldn't this be reported upstream too?

I fixed this by editing sites/all/libraries$ vi colorbox/jquery.colorbox-min.js adding a v

Patch looks OK to me too.

frjo’s picture

Title: Colorbox plugin Not detected » Colorbox plugin version detection regex needs updating

  • frjo committed dac73fc on 7.x-2.x
    Issue #2336341 by iS: Fixed Colorbox plugin version detection regex...
frjo’s picture

Status: Needs review » Fixed

I have committed a slightly different update to the regex to 7.x-2.x:

'@(?i:Colorbox)\sv?([0-9\.a-z]+)@'

Will make a new release during the weekend.

ItangSanjana’s picture

#9 tested and works. Nice regex :)

ItangSanjana’s picture

Issue summary: View changes
jackmoore’s picture

Fredrik, my apologies for breaking things. I would not have guessed the comment block was depended on by anyone. There is a colorbox.jquery.json file included in the download that is used by the jQuery plugins repository and contains information such as the version number. I'm not sure what limitations you have to deal with, but getting the version property value from a json object would be more dependable than a regex. I can add, and probably will add, a package.json file for NPM that contains similar info.

frjo’s picture

Nice to see you here on d.o. Jack! No problem on the version number change, it was an easy fix.

Drupals library api don't support reading json as of now so a regex would be needed there anyway and not all users would bother adding more than the essential js files to their Drupal installs.

P.S. The Colorbox module has 200000+ live installs now :-)!

mxh’s picture

#9 works for me as well.

Status: Fixed » Closed (fixed)

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