Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | undefined_nid_1891780.patch | 893 bytes | frjo |
Comments
Comment #1
frjo CreditAttribution: frjo commentedCould 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.
Comment #2
bisonbleu CreditAttribution: bisonbleu commentedAfter applying patch, error message is gone. All seems to work fine. Thanks @frgo!
Comment #3
frjo CreditAttribution: frjo commentedCommitted to 7-dev.
Thanks for reporting it and testing the patch!
Comment #4
frjo CreditAttribution: frjo commented