Warnings when saving an invalid image field

Created on 8 March 2022, about 3 years ago
Updated 12 April 2023, almost 2 years ago

Problem/Motivation

When saving an entity with an image field using this widget, and when the image is invalid (e.g. missing), the following warnings appear multiple times at the top of the page:

Warning: Undefined array key "crop_wrapper" in Drupal\image_widget_crop\Element\ImageCrop::cropRequired() (line 461 of modules/contrib/image_widget_crop/src/Element/ImageCrop.php).
Warning: Trying to access array offset on value of type null in Drupal\image_widget_crop\Element\ImageCrop::cropRequired() (line 461 of modules/contrib/image_widget_crop/src/Element/ImageCrop.php).

Steps to reproduce

  1. Save an image field with this widget
  2. Delete the image file from the filesystem
  3. Go back to the form, change any field and save the entity
🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024