I get the following error message when using the Colorbox trigger field in Views.

Notice : Undefined property: stdClass::$nid in colorbox_handler_field_colorbox->render() (ligne 189 in /Applications/MAMP/htdocs/zamorg2/sites/all/modules/colorbox/views/colorbox_handler_field_colorbox.inc).

Use case: using a single image to trigger a popup slideshow for a multi-valued imagefield as suggested here

CommentFileSizeAuthor
#1 undefined_nid_1891780.patch893 bytesfrjo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frjo’s picture

Status: Active » Needs review
FileSize
893 bytes

Could you test this patch and see it if fixes your problem?

There was an earlier patch to make the function degrade gracefully if there was no JavaScript. That patch assumed the nid would always be present, that seems not to be the case. This new patch add a check to see if there are indeed a nid value or not.

bisonbleu’s picture

After applying patch, error message is gone. All seems to work fine. Thanks @frgo!

frjo’s picture

Committed to 7-dev.

Thanks for reporting it and testing the patch!

frjo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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