When creating a node I was running into PHP notices on lines 40 and 45 of theme/theme.inc:

Undefined index: uri in template_preprocess_galleria_container()

A patch is provided with some defensive code if there is no uri field available. This seems to do the trick.

CommentFileSizeAuthor
galleria_fix_missing_uri.patch607 bytesmurrayw
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kroimon’s picture

Thanks for the patch!

How exactly did you run into these notices? I tried creating a new node with a Galleria-styled image field, but never got any errors...

miro_dietiker’s picture

I see 2 issues to check
- adding a field after already nodes exist, displaying those nodes
- adding a non-required image field, creating a node without uploading an image, displaying it

kroimon’s picture

In both cases, the $items array should be empty, so the foreach loop should never run.
I asked how to reproduce the bug to see what elements in the items array have no uri field.

murrayw’s picture

I never actually saw the error myself but it was reported by a user. The steps they took to generate it were:
- create a new galleria node
- upload multiple images
- click save

The user reported that only the first image was saved. Looks like there might have been some problem with saving the images leading to the image not having a full uri. So not sure how it happened but we did have images with no uri.

kroimon’s picture

Status: Active » Fixed

Ok, I don't exactly know how this could happen but I just committed your patch which should appear in the next -dev build.

Marking this as being fixed for now, might be reopened once we find the actual cause :-)

Status: Fixed » Closed (fixed)

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