Well... 9 hours ago (!?) this latest Github commit (https://github.com/jackmoore/colorbox/commit/948e2aaf3d90237fd0a935b4f13...) make our colorbox_libraries_info() pattern get crazy, because package now rename from "ColorBox" to "Colorbox"...

This simple patch makes our pattern PCRE regex into case insensitive for both "ColorBox" and "Colorbox" so somehow backward compatibile.



hswong3i’s picture

Simple patch for colorbox GIT 7.x-2.x

hswong3i’s picture

Status: Active » Needs review
quantumized’s picture

Works, thanks!

criscom’s picture

Patch tested. Works for me.

lukus’s picture

Works for me also, thanks very much.

plach’s picture

Status: Needs review » Reviewed & tested by the community

Looks good and works as advertised.

firfin’s picture

Priority: Normal » Major

Works for me.
This bug renders the module unusable so setting to major. Should even be critical maybe?

This patch also fixes #1958128: colorbox not being recognised so marked that issue as a duplicate.

JRANGER’s picture

How do I install this? Sorry im a newb

Anonymous’s picture

One does not simply install a Drupal patch..

jordan8037310’s picture

Works for me, thank you!

Hopefully this gets pushed into a production release ASAP.

Here are some simple steps for those who are not used to working with patches.

  1. Open /sites/all/modules/colorbox/colorbox.module
  2. Go to line 80 where it says 'pattern' => '@ColorBox v([0-9\.a-z]+)@',
  3. Delete that line and replace it with: 'pattern' => '@(?i:ColorBox) v([0-9\.a-z]+)@',
  4. Save and you're done!
mfuggle’s picture

I started looking at this issue more than 9 hours ago and have been going mad but the patch works for me...

frjo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch and the testing!

Committed to 7.2-dev together with other followup changes of the plugin name.

Tobion’s picture

The colorbox functionality didn't work for me when I made a bigger update of drupal and modules because the library was apparently not loaded. I figured the source of the problem was the issue that is described here.
I fixed it slightly different: 'pattern' => '@Colorbox v([0-9\.a-z]+)@i',
I think its a little better solution.

Also it would be nice if the colorbox_requirements method also shows the $library['error message'] text so one knows why the library is allegedly not installed correctly. This would have saved quite some time of debugging.

mpotter’s picture

Tore my hair out for hours trying to debug this (why Colorbox suddenly stopped working on my site!). I agree with #13 that *somewhere* the Colorbox module should be showing the error message if the library is not detected properly (such as on the Colorbox admin settings page).

cs_laca’s picture

Thanks for the info. It works.

srf’s picture

Patch works for me, too. Big Thanks to hswong3i.

hswong3i’s picture

@srf: Please give thanks to frjo for quick response + indeed cleanup + commit to -dev so everyone can benefit with this fix just within 5 days ;-)

bradezone’s picture

My colorbox.module file looks like this (latest stable version for 7.x):

function colorbox_get_version($colorbox_js = NULL) {
  $version = 0;
  $pattern = '#ColorBox v([0-9\.a-z]+)#';

So I just changed "ColorBox" to "Colorbox" on the last line and that fixed it.

frjo’s picture

@bradezone, a new stable release has now been made that includes this bug fix.

If you want to test code that has been committed but are not yet part of a stable release you need to download the 7.x-2.x-dev version.

bradezone’s picture


BTW here's an interesting response from the colorbox developer =]

mrP’s picture

You can also just use https://github.com/jackmoore/colorbox/archive/1.4.6.zip or earlier where the ColorBox -> Colorbox changes weren't committed.

Status: Fixed » Closed (fixed)

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