This morning I just updated the color box module to version: 7.x-2.2

and since then it stopped working, including the links which used to open using colorbox-node

Please check, as I am currently struck on live server.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anandyrh’s picture

I am unable to revert back too :(

frjo’s picture

Category: bug » support

Have you updated the Colorbox plugin to the latest version as well?

What does the status page at "admin/reports/status" say?

Anandyrh’s picture

I have updated the Colorbox plugin to the latest and the status pages shows [Colorbox plugin 1.3.23] in green,

and still all the pages where I am using the colorbox they all the broken, until and unless I disable this module.

ytorf’s picture

I ran into the same problem when I upgraded to 7.x-2.2. Looks like the path to the Javascript files has changed. If you download the new Colorbox library and replace the existing one in sites/all/libraries/colorbox it should work. I just moved jquery.colorbox.js and jquery.colorbox-min.js from sites/all/libraries/colorbox/colorbox to sites/all/libraries/colorbox and it started working again.

ytorf’s picture

Also you can download the new Colorbox library here: http://www.jacklmoore.com/colorbox

Anandyrh’s picture

The path on my site is sites/all/libraries/colorbox/jquery.colorbox.js and the same for the others.

but still I have the same problem.

Anandyrh’s picture

I also tried by uninstalling and installing the colorbox and the colorbox node module the issue did persists.

frjo’s picture

Can you post a link to your site here, or send it to me directly if you prefer.

Anandyrh’s picture

hi frijo,

I had a backup of live server so I could restore the old version on live, and moved the unstable d7 to local server so it's not possible to share the link now :(

Anandyrh’s picture

currently I am using a views colorbox on ubercart product pages, and when the colorbox module is enabled all the products link give 500 Internal server error. else rest of nodes of other content types are working fine.

frjo’s picture

Status: Active » Closed (cannot reproduce)

Good to here that you got your site working again.

If you in some way can give me access to the troubled version of the site I would be happy to take a look at it.

Anandyrh’s picture

sure, will try it... but the issue still persist on local site, with 7.x-2.2 version. so I feel the ticket should be kept open/active state.

Anandyrh’s picture

hi @frjo,

This issue is due to field type 'Colorbox: Colorbox trigger' when I remove this trigger field from the view all works fine on node.

There is something seriously wrong with it, as it collapses the entire node.

Anandyrh’s picture

Status: Closed (cannot reproduce) » Needs review
frjo’s picture

Does Colorbox on a standard image field work as it should?

Below is the only small change that has been made to the Colorbox trigger part of the code. Could you try to revert that and see if your problems disappear? Not that it should create any problems.

diff --git a/views/colorbox_handler_field_colorbox.inc b/views/colorbox_handler_field_colorbox.inc
index 6d80fc5..16da1d7 100644
--- a/views/colorbox_handler_field_colorbox.inc
+++ b/views/colorbox_handler_field_colorbox.inc
@@ -186,7 +186,11 @@ If you would like to have the characters %5B and %5D please use the html entity
     // Remove any parameters that aren't set.
     $link_options['query'] = array_filter($link_options['query']);
 
-    $link_tag = l($link_text, '', $link_options);
+    // If the nid is present make the link degrade to the node page if
+    // JavaScript is off.
+    $link_target = isset($values->nid) ? 'node/' . $values->nid : '';
+
+    $link_tag = l($link_text, $link_target, $link_options);
 
     // The outside div is there to hide all of the divs because if the specific Colorbox
     // div is hidden it won't show up as a Colorbox.
Anandyrh’s picture

Hi Frjo,

Thanks a lot for the quick update, please let me know where should the above code need to be updated? (On which file?)

Anandyrh’s picture

Sorry if am wrong.

As per my understanding on the above code shared on #15

on the file located in path: [sites/all/modules/colorbox/views/colorbox_handler_field_colorbox.inc] replace the code on line number 193:

Replace: $link_tag = l($link_text, $link_target, $link_options);

With: $link_tag = l($link_text, '', $link_options);

Solves my problem.

@Frijo, please alert me if I have done anything wrong.

morphay’s picture

hi guys!

I have the same problem with "Colorbox: Colorbox trigger" , remove code from colorbox_handler_field_colorbox.inc not solved the problem. Then I returned the old ColorBox v1.3.20.1 and it worked. Drupal module version 7.x-2.2.

kbrinner’s picture

I am running Colorbox 7.x-2.2 on Drupal 7.19 and found that after updating Colorbox to 2.2 it wasn't working correctly. However, updating the Colorbox library solved this issue. Although this doesn't seem to work for others, I wanted to report that it's working for me. It's currently on my local machine only but when I update to prod I can post a link if it would be helpful.

Miao1994’s picture

I have the same problem, colorbox doesn't work with standard image field anymore after updating to 7.x-2.2. Colorbox plugin 1.3.23.

frjo’s picture

Title: 7.x-2.2 Does not work! » The trigger field in 7.x-2.2 does not work in some cases
Category: support » bug
Status: Needs review » Postponed (maintainer needs more info)

If the Colorbox does not work for normal image fields then it's almost certain that the Colorbox plugin (library) has not been updated correctly just as @kbrinner explains.

@Anandyrh, You did exactly right and I'm quite surprised that this was causing your problem. If you can not make the site available to me, could you send me and export of the view you are using? That might be enough for me to fins out whats causing this.

Anandyrh’s picture

FileSize
6.39 KB

Hi Frjo

I have attached the view. This view was built to open images inside a colorbox, images which are attached to a node.

frjo’s picture

@Anandyrh Could you try the attached patch on a 7.x-2.x-dev download of the Colorbox module? I found a bug where a class attribute was a string and not a array.

PS. Why do you use the complicated Colorbox trigger field for this and not simple use the Colorbox formatter on the image field? As far as I can see uou are simply displaying a image in the Colorbox.

frjo’s picture

Status: Postponed (maintainer needs more info) » Needs review
Anandyrh’s picture

Thanks a lot Frjo,

Sure I'll try the 7.x-2.x-dev with patch and will let you know the result.

The reason I am using the Colorbox trigger field is because I have 6 images attached to a node and I need to display the first one as a Thumbnail and on click of it I had to show all the 6 images in a popup.

Miao1994’s picture

I just uploaded to 7.x-2.2-dev from 7.x-2.2 and everything seems to work fine. I tried it on standard image field. Module works also using colorbox-node and views. Drupal 7.18 and Colorbox plugin 1.3.23.

Tino’s picture

Simple imagefield with colorbox display was not displaying clicked image in a colorbox anymore after upgrading to 7.x-2.2, but just loaded it as a seperate page.
Updating to 7.x-2.x-dev of 2013-Jan-23 fixed it for me as well.

frjo’s picture

@Tine this issue is only for the Colorbox trigger field. If Colorbox works with 7.x-2.x-dev of 2013-Jan-23 it will work with 7.x-2.2 as well since there are no difference between them.

Tino’s picture

@frjo: Sorry for posting in the wrong issue queue. But I can assure you there is a difference on my site. As soon as I completely reinstall 2.2, colorbox images are not opened in a colorbox overlay anymore, but in a new page. Reinstalling 2.x-dev and it works as expected.

frjo’s picture

Status: Needs review » Fixed

Committed to 7-dev.

Status: Fixed » Closed (fixed)

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