I have a content type with an image field that has 2 different manual crop image styles. I've made another image style which has the "Manual Crop: Automatically reuse" as the style effect, and I've created a View which has that image style selected for the image field.

I have pictures in a gallery that can be cropped horizontally or vertically, and for that gallery to show the format it was cropped (and fallback on the image style set in Automatically reuse). Essentially, what I'm trying to do is described here:

https://www.drupal.org/node/2066891

Unfortunately, I'm not seeing any thumbnails in the View I made - the broken image links to a thumbnail that hasn't been generated. I don't think it's a permissions issue. A look in the logs show this error:

Warning: array_flip() expects parameter 1 to be array, null given in _manualcrop_get_auto_reuse_style_name() (line 836 of /home/website/public_html/sites/all/modules/manualcrop/manualcrop.helpers.inc).

Any help is greatly appreciated, thanks!

Comments

brunocampos’s picture

Found the same issue when i did the setup for new image styles with "Manual Crop: Automatically reuse".
It's trying to do an array_flip on $data['style_priority'], which is null sometimes ...

Added a patch for this.

candelas’s picture

I had this problem and the patch on #1 solved. Thanks @brunocampos

candelas’s picture

Status: Active » Reviewed & tested by the community
matthijs’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Patch applied and committed, thanks!