I am using the CVS version of the media and media_gallery modules on a Windows 7 and XAMPP development machine.

I am getting a number of errors when creating a gallery, editing a gallery and adding images. However it appears that the content does get created and can be manipulated.

When creating a new gallery i get the below errors:

* Notice: Undefined index: und in media_gallery_view() (line 275 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Warning: array_keys(): The first argument should be an array in media_gallery_view() (line 275 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Warning: Invalid argument supplied for foreach() in media_gallery_view() (line 284 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined index: und in media_gallery_view() (line 305 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Warning: array_values(): The argument should be an array in media_gallery_view() (line 305 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: pre_links in media_gallery_view() (line 316 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: post_links in media_gallery_view() (line 321 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 87 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.fields.inc).
* Warning: Invalid argument supplied for foreach() in field_attach_prepare_view() (line 1064 of X:\websites\dev.site1.com.au\modules\field\field.attach.inc).
* Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 88 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.fields.inc).
* Warning: Invalid argument supplied for foreach() in entity_prepare_view() (line 6854 of X:\websites\dev.site1.com.au\includes\common.inc).
* Warning: Invalid argument supplied for foreach() in element_children() (line 5550 of X:\websites\dev.site1.com.au\includes\common.inc).
* Notice: Undefined index: und in media_gallery_view() (line 275 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Warning: array_keys(): The first argument should be an array in media_gallery_view() (line 275 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Warning: Invalid argument supplied for foreach() in media_gallery_view() (line 284 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined index: und in media_gallery_view() (line 305 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Warning: array_values(): The argument should be an array in media_gallery_view() (line 305 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: pre_links in media_gallery_view() (line 316 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: post_links in media_gallery_view() (line 321 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 87 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.fields.inc).
* Warning: Invalid argument supplied for foreach() in field_attach_prepare_view() (line 1064 of X:\websites\dev.site1.com.au\modules\field\field.attach.inc).
* Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 88 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.fields.inc).
* Warning: Invalid argument supplied for foreach() in entity_prepare_view() (line 6854 of X:\websites\dev.site1.com.au\includes\common.inc).
* Warning: Invalid argument supplied for foreach() in element_children() (line 5550 of X:\websites\dev.site1.com.au\includes\common.inc).

and when i click on edit gallery:

Notice: Undefined index: und in FieldsRSIPreventor->getAllItems() (line 45 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\fields_rsi_prevention.inc).

And when i add an image:

* Notice: Undefined variable: pre_links in media_gallery_view() (line 316 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).
* Notice: Undefined variable: post_links in media_gallery_view() (line 321 of X:\websites\dev.site1.com.au\sites\all\modules\media_gallery\media_gallery.module).

Comments

kobnim’s picture

On a "clean" site, I get an "Undefined Index" error when I try to create my first gallery:

Notice: Undefined index: media_gallery_image_info in media_gallery_form_media_gallery_node_form_alter() (line 849 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).

How I built my site:
(a) Fresh install of Drupal 7 Beta1
(b) Upload these modules from a drupalgardens export: entity, media, media_gallery, multiform, styles
(c) Enable media_gallery

kobnim’s picture

Continuing from the post above ...

I then submitted the gallery node-form and got these errors:

* Notice: Undefined index: und in media_gallery_view() (line 270 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
* Warning: array_keys(): The first argument should be an array in media_gallery_view() (line 275 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
* Warning: Invalid argument supplied for foreach() in media_gallery_view() (line 286 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
* Warning: array_values(): The argument should be an array in media_gallery_view() (line 309 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
* Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 87 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.fields.inc).
* Warning: Invalid argument supplied for foreach() in field_attach_prepare_view() (line 1064 of /modules/field/field.attach.inc).
* Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 88 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.fields.inc).
* Warning: Invalid argument supplied for foreach() in entity_prepare_view() (line 7084 of /includes/common.inc).
* Warning: Invalid argument supplied for foreach() in element_children() (line 5736 of /includes/common.inc).

I then clicked "edit gallery" (on my newly-created gallery node) and got these errors:

* Notice: Undefined index: media_gallery_image_info in media_gallery_form_media_gallery_node_form_alter() (line 849 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
* Notice: Undefined index: und in FieldsRSIPreventor->getAllItems() (line 45 of /sites/all/modules/contrib/drupalgardens/media_gallery/fields_rsi_prevention.inc).

I then submitted by edited gallery node and got these errors:

# Notice: Undefined index: und in FieldsRSIPreventor->getAllItems() (line 45 of /sites/all/modules/contrib/drupalgardens/media_gallery/fields_rsi_prevention.inc).
# Notice: Undefined index: und in media_gallery_view() (line 270 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Warning: array_keys(): The first argument should be an array in media_gallery_view() (line 275 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Warning: Invalid argument supplied for foreach() in media_gallery_view() (line 286 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Warning: array_values(): The argument should be an array in media_gallery_view() (line 309 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 87 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.fields.inc).
# Warning: Invalid argument supplied for foreach() in field_attach_prepare_view() (line 1064 of /modules/field/field.attach.inc).
# Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 88 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.fields.inc).
# Warning: Invalid argument supplied for foreach() in entity_prepare_view() (line 7084 of /includes/common.inc).
# Warning: Invalid argument supplied for foreach() in element_children() (line 5736 of /includes/common.inc).
# Notice: Undefined index: und in media_gallery_view() (line 270 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Warning: array_keys(): The first argument should be an array in media_gallery_view() (line 275 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Warning: Invalid argument supplied for foreach() in media_gallery_view() (line 286 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Warning: array_values(): The argument should be an array in media_gallery_view() (line 309 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.module).
# Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 87 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.fields.inc).
# Warning: Invalid argument supplied for foreach() in field_attach_prepare_view() (line 1064 of /modules/field/field.attach.inc).
# Notice: Undefined variable: media_entities in media_gallery_field_formatter_view() (line 88 of /sites/all/modules/contrib/drupalgardens/media_gallery/media_gallery.fields.inc).
# Warning: Invalid argument supplied for foreach() in entity_prepare_view() (line 7084 of /includes/common.inc).
# Warning: Invalid argument supplied for foreach() in element_children() (line 5736 of /includes/common.inc)

kobnim’s picture

epilogue ...
I was able to add photos to the gallery, with no error messages.

JC8008’s picture

I get the same massages, have given up trying to fix. Have set up 4 galleries and they work fine. I am using Drupal 7 beta1. http://www.mycustomgolf.net/taxonomy/term/1

JacobSingh’s picture

Version: » 7.x-1.0-beta1

Let me know if these are still there, we certainly don't want notices in the logs.

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

Are you still experiencing this with beta7, then please move the version to beta7 or mark the status as fixed?

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)