Closed (fixed)
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
20 Feb 2013 at 14:59 UTC
Updated:
4 Jan 2014 at 02:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
esbenvb commentedHere's a patch that solves it.
Important! When porting the patch make sure that the correct author information is used as described on http://drupal.org/user/989064
Comment #2
adamtong commentedIt is a similar issue? http://drupal.org/node/1939828
But the path cannot help my case.
Comment #3
dave reidComment #4
dave reidComment #5
aaron commented#1: file_entity-notice_undefined_image_dimensions-1922444-1.patch queued for re-testing.
Comment #6
aaron commentedDuring my testing I was unable to replicate the issue. Has it been fixed elsewhere? I used several Flickr images with the oEmbed modules for testing.
Comment #7
dave reidI've only been able to replicate this when there were other things going wrong, like doing something like this:
$file = file_load('50000000') // A file ID that does not exist. This assigns $file to FALSE.
file_save($file); // Calling this on not a file object causes the errors.
Comment #8
esbenvb commentedIt might have been fixed in elsewhere in the meantime, but I still think it is a good thing to should do a check for the mentioned image_dimensions properties before reading their values, in case they haven't been set for some reason.
Comment #9
aaron commentedI don't know what added value adding this patch will give in light of the fact that we are not able to replicate the issue. On the other hand it doesn't really add much in processing time so I'm not averse to adding it, however note that #1496942: Support making any kind of meta-data available to file_load() and file_load_multiple() consumers will likely make this patch obsolete anyway.
Comment #10
devin carlson commentedI actually came across this while working on a patch for #1977662: On fresh install, existing files are assigned to 'undefined' file type.
As aaron mentioned in #9, this will go away with #1496942: Support making any kind of meta-data available to file_load() and file_load_multiple() consumers so it should be fine to add for now until that issue is fixed.
I've attached patches for #1977662: On fresh install, existing files are assigned to 'undefined' file type (which include tests): one with the fix in #1 and one without. This should demonstrate that this is a reproducible issue.
Comment #12
aaron commentedYes, that demonstrates the issue. It looks good to me so let's get this in.
Comment #13
devin carlson commentedGreat! Committed #1 to 7.x-2.x.