Doesn't work with the Image Widget Crop module in Drupal 10

Created on 7 October 2023, over 1 year ago

Problem/Motivation

Drupal 10 changed the hooks used for modifying a field widget. We already addressed it, but the fix we implemented didn't take into account sites that use the Image Widget Crop module. The "decorative" checkbox does not appear on the image widget form.

Steps to reproduce

Use Drupal 10, install this module and the Image Widget Crop module, observe that the "decorative" checkbox doesn't show up on the widget form.

Proposed resolution

The widget alter hook we use only works specifically for the Image widget provided by core. We can instead implement the generic hook_field_widget_single_element_form_alter() hook and check if the widget plugin is an instance of ImageWidget instead, which is what we did for the Drupal 9 hook.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

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

Comments & Activities

Production build 0.71.5 2024