am getting below error message while trying to manage the uploaded items using gallery edit tab
"Notice: Undefined property: stdClass::$node_gallery_media in node_gallery_api_manage_items_form() (line 277 of .....sites/all/modules/node_gallery/node_gallery_api.pages.inc) "

And this error while trying to sort the uploaded images
"
Notice: Undefined property: stdClass::$type in file_view_file() (line 220 of ........../.../sites/all/modules/file_entity/file_entity.file_api.inc).
Notice: Undefined property: stdClass::$fid in file_build_content() (line 175 of /.../.../sites/all/modules/file_entity/file_entity.file_api.inc).
EntityMalformedException: Missing bundle property on entity of type file. in entity_extract_ids() (line 7633 of /.../../includes/common.inc).

Note that these errors are happening if I change my Gallery Item gallery medial feild from "file" to "image" type.
I deleted the gallery media field and created new image field with same machine name but type as " image" field....I can able to uplad the images and could able to display in views etc, but "sort" and "manage" options are not working after those changes

also please change the gallery item feild to "image " type instead of "file" ( like it was in D6 node gallery) so that users can take advantage of views modules etc.

Comments

mazharoddin’s picture

Status: Active » Fixed

I could able to resolve this by changing the node gallery item field type from "File" to "image" in node_gallery_api.module file ...here is the code snippet if any one interested .

$items[NODE_GALLERY_MEDIA_FIELD] = array(
    'description' => t('Default field for storing node gallery media.'),
    'field' => array(
      'field_name' => NODE_GALLERY_MEDIA_FIELD,
      'type' => 'image', ==========================> Changed from "File" to "image"
      'cardinality' => 1,
    ),
    'instance' => array(
      'label' => t('Gallery Media '),
      'description' => t('File to store Node Gallery media.'),
      'display_label' => 1,
      'settings' => array(
        'file_directory' => 'node_gallery',
        'file_extensions' => 'jpg jpeg gif png',
        'description_field' => 0,
      ),
      'widget' => array(
        'module' => 'image', ====================>Changed from "File" to "image"
        'type' => 'image', ======================>Changed from "File" to "image"
        'weight' => 2,
      ),
    ),
  );
davidee’s picture

I am going to try this! Thank you for this post!
Do you think: http://drupal.org/node/1991904 also has something to do with this?

Status: Fixed » Closed (fixed)

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

mazharoddin’s picture

you are welcome, sorry I didn't get chance to look into it, but at glance I feel both are different issues..thanks

btmash’s picture

Status: Closed (fixed) » Active

I'm reopening this issue so the module maintainers see and fix within the module (or you'll need to apply your patch again next time).

stinky’s picture

I tried #1 and it didn't fix the problem I'm having when clicking on the sort button.

I'm getting the msg

Notice: Undefined property: stdClass::$fid in file_view() (line 165 of /content/jukebox/project_jukebox/sites/all/modules/media/file_entity/file_entity.file_api.inc).
EntityMalformedException: Missing bundle property on entity of type file. in entity_extract_ids() (line 7663 of /content/jukebox/project_jukebox/includes/common.inc).

btmash’s picture

Part of the issue with the module is the theming implementation; it assumes that there is an image in the node_gallery which it then runs file_view on (this is the function that runs the entityfieldquery). Because it gets passed a NULL object, it throws an exception. I'm not fully sure why it doesn't just output text if there is no image but that is the core of the issue re: the error (minus the patch). But outside of figuring out a patch on that front, the only other option is to require an image to be added.

stinky’s picture

Thanks. For some items adding an image isn't an option because an image is being generated via video thumbnail. Oh well. Guess I can't use Sort.