Closed (fixed)
Project:
Image javascript crop
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2011 at 15:43 UTC
Updated:
16 Nov 2011 at 20:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
nils.destoop commentedApparently, the media_edit form has been changed for file_entity_edit form. Any idea if this will stay this way?
Comment #2
chiebert commentedI don't know, actually, but I've cross posted this in the File Entity issue queue at #1309168: media_edit form changes breaks image javascript crop to see if there are any answers forthcoming. For the record, the situation is unchanged with today's latest:
imagecrop-7.x-1.x-dev (2011-Oct-05)
media-7.x-2.x-dev (2011-Oct-13)
file_entity-7.x-2.0-unstable2
And here's a screenshot of what I'm seeing (note the lack of thumbnail or 'edit image' button for the crop)...
Comment #3
chiebert commented@zuuperman: As it stands, Imagecrop works correctly with the Media-7.x-1.x branch - but according to that project's maintainers, the Media-7.x-2.x branch is the way forward, and part of the change was to abstract out some of the file handling bits to a new module: file_entity.
Possible solution: As of imagecrop-7.x-1.x-dev (2011-Oct-13), I was able to get Imagecrop to work simply by duplicating function imagecrop_form_media_edit_alter (lines 169-196 in imagecrop.module) and renaming the copy to imagecrop_form_file_entity_edit_alter.
Leaving the original hook_form_FORM_ID_alter implementation keeps things working for media-7.x-1.x, while the new version correctly hooks into the new media/file_entity way of doing things. I tested it with a fresh upload and an existing upload and it seems to work: I get the 'crop this image' button, which fires the popup and allows to me correctly set all the imagecrop-enabled image presets.
The preview thumbnail still isn't appearing, but I'm not sure if that's imagecrop's problem or file_entity/media's...
Comment #4
JStanton commentedHere's a patch that implements #3
Comment #5
JStanton commentedAsking testbot to test
Comment #6
nils.destoop commentedTested the patch and committed it to dev. Did a little change, i just called "imagecrop_form_file_entity_edit_alter" from "imagecrop_form_file_entity_edit_alter"