I'm not sure if I should be posting this as a bug under media_flickr. But when I add a flickr image using that module, I get these notices:

Undefined index: width in file_entity_file_update() line 120...
Undefined index: height in file_entity_file_update() line 120...

I should indicate that the image successfully gets added and any metadata about the image is saved as well. So this doesn't seem to prevent the content from being created. FYI the version of media_flickr is 7.x-2.0-alpha3 if that's important.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlk4p’s picture

I think this is a File Entity problem because I see a similar type of error within the module I'm developing. But I don't have a field called "metadata" as one of those created in the module.

SocialNicheGuru’s picture

Issue tags: +PDF

I am getting undefined width and height also.

I am using the pdf module

Notice: Undefined index: width in file_entity_file_update() (line 120 of /modules/all/file_entity/file_entity.file.inc).
Notice: Undefined index: width in file_entity_file_update() (line 120 of /modules/all/file_entity/file_entity.file.inc).
Notice: Undefined index: height in file_entity_file_update() (line 120 of /modules/all/file_entity/file_entity.file.inc).
Notice: Undefined index: height in file_entity_file_update() (line 120 of /modules/all/file_entity/file_entity.file.inc).

ditcheva’s picture

Same here after adding the media and file_entity modules and running cron...

Delphine Lepers’s picture

Moved the closing bracket down so that all metadata management is only made on files that contain metadata.

Delphine Lepers’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, file_entity.file_.inc_.patch, failed testing.

Delphine Lepers’s picture

Status: Needs work » Needs review
FileSize
1.31 KB

Fixed path and file name

Status: Needs review » Needs work

The last submitted patch, file_entity-empty-width-error-2081713-7.patch, failed testing.

Delphine Lepers’s picture

Status: Needs work » Needs review
FileSize
1.32 KB

Fix file path

jlk4p’s picture

I just installed and tested the patch. It cleared up the problem with the flicker module. Thank you for fixing this!

cosmicdreams’s picture

Maybe I have to apply this patch to really undestand what was changed but it seems like the only thing that checked was the removal of a bracket and more indentation. No visible changes to the file path are in that patch.

NancyDru’s picture

Devin Carlson’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
Issue summary: View changes
FileSize
1.14 KB

It looks like there are a few places where a check to ensure that the file is not empty is missing.

The attached patch adds a check to all of those locations.

Devin Carlson’s picture

Status: Needs review » Fixed

Tested #13 with a number of empty files to confirm the issue and verify that the patch fixed it while still allowing non-empty files files to have their dimensions stored as metadata.

Committed #13 to File entity 7.x-2x.

Status: Fixed » Closed (fixed)

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