From what I can tell, EPSA crop stopped working with some recent media module dev versions. The error is on line 25 of epsacrop-media.js where it tries to inspect fileInfo.fid, which does not exist. The problem is that on line 22, it does:

var elem = $(this).parent();

But, at least in the HTML on my site, this does not return the element containing the ID attribute. The attached patch changes this line to read:

var elem = $(this).parents('.media-widget');

This will be sure that it grabs the parent element with the .media-widget class, which is the element that will have the ID attribute that epsacrop needs.

CommentFileSizeAuthor
epsacrop-fix_missing_id.patch596 bytesJosh Benner

Comments

lukus’s picture

Patch works for me, thanks very much.

yvmarques’s picture

Issue summary: View changes
Status: Needs review » Fixed

Hi,

Thanks for the patch it has been committed.

-- Yvan

Status: Fixed » Closed (fixed)

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