The problem this patch is addressing was throwing only notices on PHP 7.4 but is throwing errors on PHP 8+, so the patch is valid I think. Steps to reproduce this using the focal_point module:
On Vanilla Drupal 9.5+
- Enable the modules media, media_library and focal_point
- Add an image style with a focal_point image effect
- Configure the media_library form display of image media to use the Image (Focal point) field widget
- Add a media field to the article content type
- Configure the form display of the article content type to use the media_library widget
- Add an article and add a media to the article by uploading a new image
- After uploading the image, do not enter an alt text and click save
There will be an ajax error originating from the location in code the patch here changes.
- Status changed to Needs work
about 2 years ago 1:18pm 2 March 2023 - πΊπΈUnited States smustgrave
If valid it will need a test case to show the issue.
Though not sure thatβs a fix that would get committed. This may be covering a symptom of a bigger issue. Like why is that value not set when it gets to this point?
But either way tests will 100% be needed
- ππΊHungary szato
Maybe related to Focal point image widget causes validation errors not to be shown π Focal point image widget causes validation errors not to be shown Needs work ?