I have an image field on an entity, and the colorbox is not working. Information:

1) Field type: Image
2) Display format: Colorbox
3) Display format settings:
Content image style: thumbnail
Colorbox image style: large
Colorbox gallery type: Per post gallery
Colorbox caption: Automatic

4) Libraries module installed: Yes
5) Library downloaded using drush colorbox-plugin
6) Image renders in entity: Yes
7) HTML for image in entity:

<a class="colorbox" rel="gallery-message-650" title="fuji.jpg" href="http://example.com/sites/default/files/styles/large/public/field_message_image_images/fuji_20_0.jpg?itok=n9NOL89C">
<img width="180" height="180" title="fuji.jpg" alt="" src="http://example.com/sites/default/files/styles/square_thumbnail/public/field_message_image_images/fuji_20_0.jpg?itok=IROAuDE-" typeof="foaf:Image">
</a>

No errors are coming up in my javascript console. When I click the image, the colorbox does not pop up, it simply follows the link to the full-sized image.

Can someone give me a hand to point me to where I am going wrong?

Comments

jaypan’s picture

Additional information: colorbox.js is loading (visible in my HTML source), but jquery.colorbox-min.js is not being loaded.

jaypan’s picture

I've found that if I manually add jquery.colorbox-min.js, it works. But shouldn't the module be loading this already without having to do it manually?

martinbertinat’s picture

Priority: Normal » Critical

Same issue. I Think the module has to load the library automatically.

martinbertinat’s picture

Category: support » bug

Version 7.x-2.3 works OK.

Also happens with colorbox formatter on Node Presentation.

nicstar’s picture

Same problem here with jquery.colorbox-min.js not loading in version 7.x-2.4

silurius’s picture

Same problem here, only in my case jquery.colorbox-min.js seems to be loading (visible in source). Don't have a problem creating colorbox effects manually, only with the image field.

silurius’s picture

Okay...it looks like my issue may not be the same. After poking around, I found that the problem began immediately after I was following frjo's image gallery and a image slideshow tutorial, where I installed the Field Slideshow module. Immediately after completing his first part images under sites/default/files and its subfolders no longer wanted to display. So something, somewhere altered permissions, or something. Wondering if this may be related to what you guys are experiencing, but assuming it's not. Still troubleshooting, will start from scratch tomorrow and try to reproduce.

jaypan’s picture

Title: Colorbox not working with image field » Colorbox not inserting JS file on image field display

It's not the same thing. I'm updating the thread title to more accurately represent the current issue.

jglynn’s picture

I'm getting the same problem, jquery.colorbox-min.js not loading in version 7.x-2.4

srgk’s picture

as a workaround i added this line to template.php and colorbox came alive

drupal_add_js('sites/all/libraries/colorbox/jquery.colorbox-min.js');

frjo’s picture

Category: bug » support

I'm unable to replicate this problem. What happens if you set up a fresh Drupal 7 site, install Colorbox modules and plugin and try to use it with an image field?

Anonymous’s picture

Adding below to my template.php also worked for me.

drupal_add_js('sites/all/libraries/colorbox/jquery.colorbox-min.js');

This was on a brand new, default install of Drupal, with the Colorbox 7.x-2.4 module installed.

Maya2013’s picture

Same problem, mentioned solution does not work for me. Colorbox.js is loading (visible in HTML source), but image is not shown as pop-up.

jaypan’s picture

--- incorrect comment removed ---

loze’s picture

I was having this problem then realized that there is a setting on admin/config/media/colorbox

Advanced settings > Show Colorbox on specific pages

Make sure its not excluded from your specific page.

mfarineau’s picture

I was having the same issue after upgrading from an older version of colorbox to the latest: images were just linking to the full-sized jpg.

What I found was that if you look at the release notes for Colorbox 7.x-2.4 (http://drupal.org/node/1964900), it says: "When updating to this version of the Colorbox module you need to update the Colorbox plugin to v1.3.21.1 or later as well."

After updating my plugin, Colorbox is again working.

quasi’s picture

Issue summary: View changes

Had the same issue. Clearing the cache solved it for me, the library got included afterwards.

mfarineau’s picture

Status: Active » Closed (outdated)

I'm going to go ahead and mark this as closed. It sounds like there are a few suggestions for resolution and this hasn't been updated in some time.