I have Colorbox 1.5.14 installed correctly in the libraries directory. On the Popup On Load configuration page, when Popup On Load is enabled, I get "The version of the Colorbox plugin library could not be detected" and subsequently, the Popup On Load module is non-functional (same warning appears in the status report). When I disable Popup On Load and enable the Colorbox module (7.x-2.8), there is no problem with Colorbox version detection and it shows up correctly in the Status Report. I also encountered the issue when I tried an earlier version of Colorbox (1.3.34).

#18 2349179-popup_onload_colorbox_library_pattern-18.patch494 bytesdshields
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2349179-popup_onload_colorbox_library_pattern-18.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more


tropicfruit’s picture

Same here.

smurfxx’s picture

Same here, I downloaded latest colorbox plugin in sites/all/libraries so the full url is [site]/sites/all/libraries/colorbox/jquery.colorbox-min.js but it isn't detected as good.

d.novikov’s picture

Hey guys, I see the issue is a critical one. Will look at this today.
@smurfxx, thank you for paying my attention to this!

smurfxx’s picture

Thank you too, I think this is a great and easy to use module so I will support you!

d.novikov’s picture

Status: Active » Fixed

Pushed a fixed to the dev snapshot. Check this out, guys!

  • d.novikov committed b571adb on 7.x-1.x
    Issue #2349179 by webpotato, tropicfruit, smurfxx: Altered library...
smurfxx’s picture

Very good, now it detect colorbox library!

d.novikov’s picture

Status: Fixed » Closed (fixed)

Thanks for the review, @smurfxx! Closing out this.

webpotato’s picture

Sorry d., still not fixed for me. Behaves just the same.

d.novikov’s picture

Status: Closed (fixed) » Needs review
rmartinezsoler’s picture

Hi guys,

'pattern' => '@(?i:Colorbox)\sv?([0-9\.a-z]+)@', -> Doesn't work
'pattern' => '@(?i:Colorbox)(?: | v)([0-9\.?]+)@', ->Doesn't work
Nothing works?

JS Library in folder .../sites/all/libraries/colorbox doesn't work
JS Library in folder .../sites/all/libraries/colorbox/colorbox doesn't work

Then, COLORBOX Module doesn't work, it is not posible to install correctly this module..This module is completely obsolete

This module should be reported to Drupal.

dshields’s picture

Yeah, this needs help

ggive’s picture

Hi guys,

This still not fixed for me either

Toby Wild’s picture

Managed to fix it by copying the Colorbox modules Regex.

I'm terrible at .patch files, so just do this:

Line: 237

'pattern' => '@Colorbox.+([0-9\.a-z]+)@',

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

dshields’s picture

I tried to help out by creating a patch here, but in testing this solution, I didn't see any change in the module's ability to find the colorbox library.

dshields’s picture

Status: Needs review » Needs work
jwilson3’s picture

I had success with version 1.6.0 (and master) and the following Regex:


Note: thoroughly untested on older versions.

dshields’s picture

494 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2349179-popup_onload_colorbox_library_pattern-18.patch. Unable to apply patch. See the log in the details link for more information. View

Sorry, bad testing on my part: It seems that Toby's solution in #14 does work nicely! Thanks for this: here's a patch, credited to Toby.

dshields’s picture

Status: Needs work » Needs review

Patch ready for review

Status: Needs review » Needs work

The last submitted patch, 18: 2349179-popup_onload_colorbox_library_pattern-18.patch, failed testing.

jwilson3’s picture

Status: Needs work » Reviewed & tested by the community

#18 works for me. Thanks!

Shameless plug: I'd appreciate feedback & review from other community members on my other small patches for this module:

* #2469231: Missing local task (tab) for /admin/content/popup_onload page
* #2469195: Redirected to admin/structure/popup_onload after save

tea2sugars’s picture

Toby's solution worked for me, thanks bud!


steve.m’s picture

Why not refactor to use the libraries API the way the colorbox module does?

$library = libraries_detect('colorbox');


version_compare($library['version'], COLORBOX_MIN_PLUGIN_VERSION, '>=')
steve.m’s picture

Aaah, wait. It's the libraries_detect() step that throws the error. Nevermind.

rooby’s picture

I opened a related issue #2714029: Don't overwrite colorbox module library. This issue is still relevant though for users who aren't also using the Colorbox module.

  • d.novikov committed b571adb on 8.x-1.x
    Issue #2349179 by webpotato, tropicfruit, smurfxx: Altered library...