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.
Hello!
When I try to open an image in a gallery, it won't be shown in Colorbox.
Colorbox Module 7.x-2.3-dev
Colorbox 1.4.3
Media, Media Gallery latest 2.0-dev
In recently added blocks, everything is fine and images still shown in Colorbox.
Comment | File | Size | Author |
---|---|---|---|
#8 | media-gallery-colorbox_1_4_37_compatibility-1.x-1930042-8.patch | 621 bytes | attila.fekete |
#1 | Colorbox_1_4_3_compatibility-1930042-1.patch | 621 bytes | Mirabuck |
Comments
Comment #1
Mirabuck CreditAttribution: Mirabuck commentedLooks to me like this is a pathing issue. I'm guessing that older versions of the colorbox library (< 1.4.3) had a /colorbox/colorbox directory structure. The attached patch fixed this issue for me.
Comment #2
Mirabuck CreditAttribution: Mirabuck commentedSwitching status to needs review.
Comment #3
dernetzjaeger CreditAttribution: dernetzjaeger commentedHello!
Just tested it, works for me too.
Thanks :)
Comment #4
klonos...better title. Seems pretty straight-forward change to me and it works.
Comment #5
woodp CreditAttribution: woodp commentedMedia Gallery 7.x-1.0-beta8
Colorbox Module 7.x-2.4
Colorbox Library 1.4.33
This colorbox path issue has me completely confused. Colorbox seems to work with the script file at \sites\all\libraries\colorbox\jquery.colorbox-min.js - That's the good news.
Confusing me is that every Media Gallery access results in a "page not found" error log entry.
I realize I'm working with beta Media Gallery code, but why the apparent incorrect error message?
Comment #6
ar-jan CreditAttribution: ar-jan commentedYes, that's what this issue is about:
- Colorbox *module* works with sites/all/libraries/colorbox/jquery.colorbox-min.js, which is the new library's default. But the colorbox module is irrelevant to media_gallery, it uses the library directly.
- Media Gallery module still expects the js file in a location previously used by the colorbox library, namely sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js
So the error message is correct: it's looking in a place where the js file is not available. You can either apply the patch, or make a copy of the jquery.colorbox-min.js file in a subfolder 'colorbox'. I currently do the latter via a drush make file.
Comment #7
woodp CreditAttribution: woodp commentedThank you, jar-an. That did explain what was going on. I think I installed the colorbox module hoping to style the colorbox window, but when unsuccessful, I left the module enabled. I now understand the colorbox window can't be restyled using conventional means.
I'm hoping work on #1311568: Integration with other lightbox alternatives continues. That would be the perfect solution.
Comment #8
attila.fekete CreditAttribution: attila.fekete commentedHere is a patch for:
Media Gallery 7.x-1.0-beta8
Colorbox Library 1.4.37
Comment #11
Moloc CreditAttribution: Moloc commentedCommited to both branches.
Path change seem to come in with version 1.3.25