After creating a flexinode with a gallery I get the following error when trying to access the node:

warning: Invalid argument supplied for foreach() in /home/luca/public_html/drupal/modules/flexinode/contrib/field_gallery.inc on line 58.

I have a vocabulary called "Image Galleries" (the default one) with different terms and subterms. Is it possible that the gallery-type is not compatible to the new drupal-version - or better to the image module?

CommentFileSizeAuthor
#3 field_gallery_foreach.patch1.08 KBdtan

Comments

flyhamst’s picture

when I modify "field_gallery.inc" on line 58.
original "foreach($node ->$fieldname as $key => $value) {"
modified "foreach($node=>$fieldname as $key => $value) {"

error never display
but gallery don't work.

crac’s picture

Attention, what you did is NOT valid php:

$var->$field is a construct for operationg on an object's field (object oriented programming), whereas for($array as $key => $value) has a different meaning: you split an array in its key and value parts.

so what you did should throw an error. perhaps this is the reason why it does not work for you ...

dtan’s picture

StatusFileSize
new1.08 KB

It seems that it is not checking for cases where there is no gallery selected.

killes@www.drop.org’s picture

applied.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

avolve’s picture

Anonymous’s picture

thechraveler’s picture

Version: » 4.6.x-1.x-dev

I am placing the patch in the contrib folder and uploading, but it is still not fixed. Only the top level of galleries shows in the selection box...HELP!

Anonymous’s picture

Status: Fixed » Closed (fixed)