Problem/Motivation

When a sub-field in an image field, some errors are triggered when uploading a file.
As per change records https://www.drupal.org/node/3363700, an update is required to the ImageWidget.php file:
'file_validate_is_image' => 'FileIsImage'
'file_validate_image_resolution' => 'FileImageDimensions' (with updated subarray)
'file_validate_extensions' => 'FileExtension'

These have been deprecated in D10.2+ and removed from D11.

Proposed resolution

Attached patch is a starting point, MR is coming.

CommentFileSizeAuthor
custom_field-image_widget-drupal_11.patch1.77 KBphily
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phily created an issue. See original summary.

phily’s picture

Title: Upload validators have changed » D11: Upload validators have changed
apmsooner’s picture

Thanks, i'll review and ensure its fixed for next release.

phily’s picture

Status: Active » Needs review

  • apmsooner committed eaf2ee13 on 3.1.x authored by phily
    Issue #3521345 by phily, apmsooner: D11: Upload validators have changed
    
apmsooner’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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