After a recent code sprint, some progress was made to bring Media module further along. After I updated to latest media-7.x-2.x-dev (Sept 28) and file_entity-7.x-1.x-dev the crop button is no longer showing up on the image edit forms.

imagecrop-7.x-1.x-dev (Sept 26)
media-7.x-2.x-dev (Sept 28)
file_entity-7.x-1.x-dev (Sept 28)

CommentFileSizeAuthor
#4 imagecrop-1294890-4.patch1.13 KBJStanton
#2 imagecrop.png32.94 KBchiebert

Comments

nils.destoop’s picture

Apparently, the media_edit form has been changed for file_entity_edit form. Any idea if this will stay this way?

chiebert’s picture

StatusFileSize
new32.94 KB

I 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)...

imagecrop broken for media

chiebert’s picture

@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...

JStanton’s picture

StatusFileSize
new1.13 KB

Here's a patch that implements #3

JStanton’s picture

Status: Active » Needs review

Asking testbot to test

nils.destoop’s picture

Status: Needs review » Fixed

Tested 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"

Status: Fixed » Closed (fixed)

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