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
Comment #1
jaypanAdditional information: colorbox.js is loading (visible in my HTML source), but jquery.colorbox-min.js is not being loaded.
Comment #2
jaypanI'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?
Comment #3
martinbertinat commentedSame issue. I Think the module has to load the library automatically.
Comment #4
martinbertinat commentedVersion 7.x-2.3 works OK.
Also happens with colorbox formatter on Node Presentation.
Comment #5
nicstar commentedSame problem here with jquery.colorbox-min.js not loading in version 7.x-2.4
Comment #6
silurius commentedSame 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.
Comment #7
silurius commentedOkay...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.
Comment #8
jaypanIt's not the same thing. I'm updating the thread title to more accurately represent the current issue.
Comment #9
jglynn commentedI'm getting the same problem, jquery.colorbox-min.js not loading in version 7.x-2.4
Comment #10
srgk commentedas a workaround i added this line to template.php and colorbox came alive
drupal_add_js('sites/all/libraries/colorbox/jquery.colorbox-min.js');
Comment #11
frjo commentedI'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?
Comment #12
Anonymous (not verified) commentedAdding 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.
Comment #13
Maya2013 commentedSame problem, mentioned solution does not work for me. Colorbox.js is loading (visible in HTML source), but image is not shown as pop-up.
Comment #14
jaypan--- incorrect comment removed ---
Comment #15
loze commentedI 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.
Comment #16
mfarineau commentedI 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.
Comment #17
quasi commentedHad the same issue. Clearing the cache solved it for me, the library got included afterwards.
Comment #18
mfarineau commentedI'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.