Hi Matthijs,

Thanks for your impressive work on this module! I found a minor issue in the admin field settings with Media and Insert:

Notice: Undefined index: insert_styles in manualcrop_field_widget_settings_form_alter() (line 551 of /pruts.ide/modules/contrib/manual-crop/manualcrop.admin.inc).
Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in manualcrop_field_widget_settings_form_alter() (line 551 of /pruts.ide/modules/contrib/manual-crop/manualcrop.admin.inc).

To reproduce:
- Install Media 7.x-2.0-unstable6 (latest) and Insert 1.2 (latest)
- Add a field of type 'File' with the Media file selector widget
- Enable Manual crop for this field

Solution is pretty straightforward: wrap the lines 552 and 553 in manualcrop.admin.inc with

if (isset($insert['insert_styles'])) {}

Comments

matthijs’s picture

Assigned: Unassigned » matthijs
Status: Active » Fixed

Hi idebr,

I couldn't reproduce this error, but I've added the additional check anyway ;-)
I also suggest you create a field of the type "image" instead of "file"...

Thanks for your help!

Matthijs

Status: Fixed » Closed (fixed)

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