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.

Members fund testing for the Drupal project. Drupal Association Learn more


Mirabuck’s picture

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

Mirabuck’s picture

Status: Active » Needs review

Switching status to needs review.

dernetzjaeger’s picture


Just tested it, works for me too.
Thanks :)

klonos’s picture

Title: Colorbox problem » Adjust path of the Colorbox library (for versions after 1.4.3)
Status: Needs review » Reviewed & tested by the community

...better title. Seems pretty straight-forward change to me and it works.

woodp’s picture

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

Type	page not found
Date	Saturday, November 23, 2013 - 8:50am
User	{admin}
Location	http://{domain}/sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js?v=1.3.9
Referrer	http://{domain}/content/{page_name}
Message	sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js
Severity	warning

I realize I'm working with beta Media Gallery code, but why the apparent incorrect error message?

ar-jan’s picture

Yes, 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.

woodp’s picture

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

attila.fekete’s picture

Here is a patch for:
Media Gallery 7.x-1.0-beta8
Colorbox Library 1.4.37

  • Moloc committed 2d8b47e on 7.x-2.x authored by Mirabuck
    Issue #1930042 by Mirabuck, attila.fekete: Adjust path of the Colorbox...

  • Moloc committed 390c43b on 7.x-1.x authored by Mirabuck
    Issue #1930042 by Mirabuck, attila.fekete: Adjust path of the Colorbox...
Moloc’s picture

Status: Reviewed & tested by the community » Fixed

Commited to both branches.
Path change seem to come in with version 1.3.25

Status: Fixed » Closed (fixed)

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