This was first reported in the 7x-2.9 update, but it's still happening for the 7x-2.13 update.

https://www.drupal.org/node/2514770 (7x-2.9)
https://www.drupal.org/node/2594167 (7x-2.10)

Basically, if you're using a colorbox trigger, the image doesn't even render at all.

@jmsosso suggested that the bug came from this code snippet (/views/colorbox_handler_field_colorbox.inc)

// Return nothing if popup is empty.
if (empty($popup)) {
  return;
}

If I understand correctly, the empty() function would remove $popup instead of checking if $popup is emtpy. So by removing $popup, it always returns empty.

Comments

vchen created an issue. See original summary.

DrupalDude777’s picture

This is from php.net : http://php.net/manual/en/function.empty.php

"Description ¶
bool empty ( mixed $var )

Determine whether a variable is considered to be empty. A variable is considered empty if it does not exist or if its value equals FALSE. empty() does not generate a warning if the variable does not exist."

So actually the empty is to check if the variable $popup contains something.

Anonymous’s picture

Status: Needs work » Active

I've set up a basic site with only colorbox, no other javascript libraries to showcase the colorbox trigger field working.

https://live-colorbox7.pantheonsite.io/colorbox-trigger

The view is fairly simple, using an image field (thumbnail) as the trigger field, and displaying the same image (original), and the body in the popup.

This is working fine with when there aren't any other modules used for the view display.

My best guess that if things aren't working with your view, some other module or library is causing a conflict.

Could you provide a bit more information about what is being used for your trigger field so I can try to duplicate that a bit more accurately.

Anonymous’s picture

Status: Active » Needs review
oadaeh’s picture

Status: Needs review » Closed (duplicate)

I'm closing this as a duplicate of #2594167: Views using colorbox trigger fail to load images.
@vchen, you should not open duplicate issues, but continue the conversation in the other issue.