Error when using a custom module effect with crop

Created on 22 February 2024, 9 months ago
Updated 30 July 2024, 4 months ago

Problem/Motivation

Hey everyone,

I'm using the Crop module on my site and a few days ago I installed Imagick, I saw that Imagic implements an effect called "Posterize" but when I use it I can see a warning on the page "Undefined array key "type" in Drupal\crop\Entity\Crop::getCropFromImageStyleId()" and that happens because on Imagick the provider of it came as "imagick" and the Crop module consider as it should crop it.

Steps to reproduce

  1. Create or edit an image style
  2. Add a crop to it
  3. Add a custom effect to it
  4. Save it

Proposed resolution

On Entity/Crop.php::getCropFromImageStyleId instead of verifying that the provider is image to continue, let's check if it is not a crop.

🐛 Bug report
Status

Postponed: needs info

Version

2.3

Component

Code

Created by

🇧🇷Brazil Lucas Fernandes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024