It appears that the Insert module support added in #1889528: Support validation when used in conjunction with Insert module only ever checks the first field’s settings.
Steps to reproduce:
Create a new content type and add two image fields, both with insert. Alt text is enabled and required only on the first image field.
Start to add content using this content type. Upload an image to both fields.
Attempt to insert both images into the text area without adding alt text. Note that both image fields show the error about missing alt text.
Reversing the settings of the two images fields, so that the first one does not require alt text, but the second does, results in both image fields allowing inserts without requiring alt text.
Comment | File | Size | Author |
---|---|---|---|
#1 | eim_2085699_multiple_fields.patch | 2.38 KB | Liam Morland |
Comments
Comment #1
Liam MorlandHere is a fix that depends on #2109357: Provide field name when calling insertIntoActiveEditor in the Insert module.
Comment #1.0
Liam MorlandProper issue link.
Comment #2
Chris Burge CreditAttribution: Chris Burge commentedThank you for contributing this patch. It fixes an issue I was experiencing with EIM and Insert.
I was running into a similar situation where I had two fields on a content type: 1) file upload and 2) image upload (in that order). When I would upload a file but no image, EIM would not allow me to insert the file using the Insert module because the image required alt text. If I saved the node and returned to the edit form, then I was able to proceed without issue. After applying this patch (and the related Insert patch), my issue is resolved.
Comment #3
Chris Burge CreditAttribution: Chris Burge commentedComment #4
star-szr+1 to RTBC, I had a similar situation to @Chris Burge where I was using the insert module for files and I would get the pop up asking for alt text. Patch looks good and addresses the bug.