Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | colorbox-master_library_pattern-1955982-1.patch | 861 bytes | hswong3i |
Comments
Comment #1
hswong3i CreditAttribution: hswong3i commentedSimple patch for colorbox GIT 7.x-2.x
Comment #2
hswong3i CreditAttribution: hswong3i commentedComment #3
3CWebDev CreditAttribution: 3CWebDev commentedWorks, thanks!
Comment #4
criscomPatch tested. Works for me.
Comment #5
lukusWorks for me also, thanks very much.
Comment #6
plachLooks good and works as advertised.
Comment #7
firfin CreditAttribution: firfin commentedWorks 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.
Comment #8
JRANGER CreditAttribution: JRANGER commentedHow do I install this? Sorry im a newb
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedOne does not simply install a Drupal patch..
Comment #10
jordan8037310 CreditAttribution: jordan8037310 commentedWorks 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.
'pattern' => '@ColorBox v([0-9\.a-z]+)@',
'pattern' => '@(?i:ColorBox) v([0-9\.a-z]+)@',
Comment #11
mfuggle CreditAttribution: mfuggle commentedI started looking at this issue more than 9 hours ago and have been going mad but the patch works for me...
Comment #12
frjo CreditAttribution: frjo commentedThanks for the patch and the testing!
Committed to 7.2-dev together with other followup changes of the plugin name.
Comment #13
Tobion CreditAttribution: Tobion commentedThe 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.Comment #14
mpotter CreditAttribution: mpotter commentedTore 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).
Comment #15
cs_laca CreditAttribution: cs_laca commentedThanks for the info. It works.
Comment #16
srf CreditAttribution: srf commentedPatch works for me, too. Big Thanks to hswong3i.
Comment #17
hswong3i CreditAttribution: hswong3i commented@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 ;-)
Comment #18
bradezone CreditAttribution: bradezone commentedMy colorbox.module file looks like this (latest stable version for 7.x):
So I just changed "ColorBox" to "Colorbox" on the last line and that fixed it.
Comment #19
frjo CreditAttribution: frjo commented@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.
Comment #20
bradezone CreditAttribution: bradezone commentedThanks.
BTW here's an interesting response from the colorbox developer =]
https://github.com/jackmoore/colorbox/commit/948e2aaf3d90237fd0a935b4f13...
Comment #21
mrP CreditAttribution: mrP commentedYou can also just use https://github.com/jackmoore/colorbox/archive/1.4.6.zip or earlier where the ColorBox -> Colorbox changes weren't committed.