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.



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

Status:Active» Needs review

Works, thanks!

Patch tested. Works for me.

Works for me also, thanks very much.

Status:Needs review» Reviewed & tested by the community

Looks good and works as advertised.

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.

How do I install this? Sorry im a newb

One does not simply install a Drupal patch..

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!

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

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.

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.

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).

Thanks for the info. It works.

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

@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 ;-)

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.

@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.


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

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.