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.

CommentFileSizeAuthor
#1 eim_2085699_multiple_fields.patch2.38 KBLiam Morland
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

Status: Active » Needs review
FileSize
2.38 KB

Here is a fix that depends on #2109357: Provide field name when calling insertIntoActiveEditor in the Insert module.

Liam Morland’s picture

Issue summary: View changes

Proper issue link.

Chris Burge’s picture

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

Chris Burge’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
star-szr’s picture

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