Crop width and height incorrectly saved as strings instead of integer in config

Created on 23 October 2024, 8 months ago

Problem/Motivation

This module doesn't define a config schema definition for the image style. As a result, Drupal doesn't know what type of data to cast form values to when saving them to config entities. The width and height end up being saved to config has strings instead of integers. This causes issues with the 4.x branch of the ImageMagick module, which is doing strict type checking and assumes the height and width values are integers. A TypeError is thrown, a warning is logged, and the crop portion of the image effect doesn't get applied.

Steps to reproduce

Proposed resolution

Define a config schema. Create a post update hook to fix all existing image style configs to use the correct data type for width & height.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.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

Merge Requests

Comments & Activities

Production build 0.71.5 2024