Closed (fixed)
Project:
Image javascript crop
Version:
7.x-1.x-dev
Component:
PHP
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Mar 2012 at 16:43 UTC
Updated:
27 Apr 2012 at 11:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
nils.destoop commentedWhat type of imagefield are you using (and d7 version)? When i dsm the element['#file'] . The type property is available.
Comment #2
cangeceiro commentedI am also running into this same issue using a standard imagefield and the latest dev
Comment #3
cangeceiro commentedattached is a patch that removes the php notice, and checks against the mimetype instead of $element['#file']->type. I assume ->type is added by media module, which would explain why i am seeing this using a standard image field. But even with the media field module, the field could be an image and have a different type since different bundles can be created with the media module, and the machine name is keyed in this field. The patch checks against the mime type instead which should be more reliable in determining the type of field.
Comment #4
nils.destoop commentedPatch has been committed to dev, but changed it a bit.
$element['#file']->type does exist for me on the standard imagefield. Maybe it's gone in latest d7?
Anyway, committed this check to dev.