When selecting more than allowed items in the media library popup a form error message appears:

You can not select more than 1 entity.

When inline form errors is enabled, an error appears: 1 error has been found: Select this item

This error is not useful and seems to be introduced here: https://www.drupal.org/project/drupal/issues/2962525

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpp created an issue. See original summary.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mpp’s picture

Status: Active » Needs review
FileSize
529 bytes

Added patch to disable inline form errors.

Before:

1 error has been found: Select this item

After:

You can not select more than 1 entity.

mpp’s picture

Project: Drupal core » Entity Browser
Version: 8.8.x-dev » 8.x-2.x-dev
Component: media system » Core API
zero2one’s picture

Status: Needs review » Reviewed & tested by the community

Tested patch #3 : works for me.

Fernly’s picture

Looks good! Thank you.

@mpp you might want to check the patch naming conventions.

oknate’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

It looks like this needs a re-roll. Tests would be helpful too.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
529 bytes

The patch does cleanly apply, it's just that the project was changed, and before it was trying to apply the patch to Drupal Core, not Entity Browser. So re-uploading

smulvih2’s picture

Patch #8 works for me.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

+1 for this

  • Dave Reid committed 8d1fd965 on 8.x-2.x
    Issue #2998066 by mpp, Dave Reid: Field widget for the Media library is...
Dave Reid’s picture

Status: Reviewed & tested by the community » Fixed

Committed #8 to 8.x-2.x. Thanks all!

joseph.olstad’s picture

@Dave Reid, thanks for this, could you also please tag a release?

Dave Reid’s picture

Yup, I am working on reviewing the RTBC queue still.

Status: Fixed » Closed (fixed)

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

stefan.korn’s picture

Isn't this a bit overdoing to disable inline form errors in general when the issue is only about a specific field widget?