I tested Node Gallery on my dev site and it seemed to work fine. Then I installed it using admin/modules/install on my production site and when I enabled both modules, I got a long list of errors. I didn't copy those, but when I went to the configuration, realized the Gallery Relationship Type had not been created correctly. When I go to the configuration page, I get this set of errors:

Notice: Undefined property: NodeGalleryRelationshipType::$gallery_types in node_gallery_api_relationship_type_list() (line 27 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.admin.inc).
Warning: Invalid argument supplied for foreach() in node_gallery_api_relationship_type_list() (line 27 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.admin.inc).
Notice: Undefined property: NodeGalleryRelationshipType::$item_types in node_gallery_api_relationship_type_list() (line 31 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.admin.inc).
Warning: Invalid argument supplied for foreach() in node_gallery_api_relationship_type_list() (line 31 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.admin.inc).
Notice: Undefined variable: item_type_url_str in node_gallery_api_relationship_type_list() (line 39 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.admin.inc).

The table has the "Node Gallery Default" relationship, but the "Gallery Types" column is empty, and the "Item Types" column is empty. When I click "Change content types" and select Gallery and Gallery Item, it tells me the relationship is updated, but it doesn't change anything and adds the following errors to the previous set:

Notice: Undefined property: NodeGalleryRelationshipType::$item_types in node_gallery_api_menu() (line 163 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.module).
Warning: Invalid argument supplied for foreach() in node_gallery_api_menu() (line 163 of /home/theseh5/public_html/TempleTraveler/sites/all/modules/node_gallery/node_gallery_api.module).

My dev and production setup is not 100% the same. Are there module dependencies I didn't notice, or is something else going on here? Hopefully I've provided enough information to go on. Thanks.

Comments

I am having a similar issue, but with the 7.x-1.0-beta3 version. No errors occur when I enable the Node Gallery API sub-module, but all these show once I enable the main Node Gallery module:

  • Notice: Undefined property: NodeGalleryRelationshipType::$gallery_types in node_gallery_api_field_extra_fields_alter() (line 510 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_field_extra_fields_alter() (line 510 of [...path...] node_gallery_api.module).
  • Notice: Undefined property: NodeGalleryRelationshipType::$item_types in node_gallery_api_field_extra_fields_alter() (line 518 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_field_extra_fields_alter() (line 518 of [...path...] node_gallery_api.module).
  • Notice: Undefined property: NodeGalleryRelationshipType::$item_types in node_gallery_api_menu() (line 163 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_menu() (line 163 of [...path...] node_gallery_api.module).
  • Notice: Undefined property: NodeGalleryRelationshipType::$gallery_types in node_gallery_api_field_extra_fields_alter() (line 510 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_field_extra_fields_alter() (line 510 of [...path...] node_gallery_api.module).
  • Notice: Undefined property: NodeGalleryRelationshipType::$item_types in node_gallery_api_field_extra_fields_alter() (line 518 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_field_extra_fields_alter() (line 518 of [...path...] node_gallery_api.module).
  • Notice: Undefined property: NodeGalleryRelationshipType::$gallery_types in node_gallery_api_field_extra_fields_alter() (line 510 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_field_extra_fields_alter() (line 510 of [...path...] node_gallery_api.module).
  • Notice: Undefined property: NodeGalleryRelationshipType::$item_types in node_gallery_api_field_extra_fields_alter() (line 518 of [...path...] node_gallery_api.module).
    Warning: Invalid argument supplied for foreach() in node_gallery_api_field_extra_fields_alter() (line 518 of [...path...] node_gallery_api.module).

This is happening on a clean install of Drupal 7.21 sandbox site (there's only a few content types and a 4.0-alpha6 webform on it so far).

I have copied database from a site where it works properly to another dev site, and have the same issue at dev site.

Version:7.x-1.0-beta2» 7.x-1.0-beta3
Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new1.37 KB

Entity method setUp() seems to be called too early to pick up galleries and items. hook_entity_load() works properly in the case.