Problem/Motivation
Able to select multiple images in media library field and not able to remove
Steps to reproduce
Go to media library form, and select a media(image) file and upload an image, now you will see, you can select multiple image files. and when you submit the form. it will through an error that multiple media files are not allowed and when we try to remove them, it doesn't work and media files doesn’t removed.
Proposed resolution
TBD
Remaining tasks
TBD
User interface changes
TBD
API changes
TBD
Data model changes
TBD
Release notes snippet
TBD
I have added a screenrecording for reference.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | After Patch.png | 178.59 KB | prasanth_kp |
| #9 | 3276219-after-patch.mov | 16.18 MB | nayana_mvr |
| #8 | 3276219-8.patch | 45.67 KB | gauravvvv |
| #9 | 3276219-before-patch.mov | 19.98 MB | nayana_mvr |
| Screen Recording 2022-04-20 at 6.29.15 PM.mov | 36.53 MB | gauravvvv |
Comments
Comment #3
maggie_s commentedAny news on this bug? We are facing the same behavior
Comment #4
gauravvvv commentedThis patch file worked for me. https://git.drupalcode.org/project/drupal/-/merge_requests/760.patch
Comment #5
gauravvvv commentedComment #7
amneh.shawish commentedComment #4 / The patch is working fine.
Comment #8
gauravvvv commentedI have attached the comment #4 patch here. Please review
Comment #9
nayana_mvr commentedVerified the patch #8 and tested it on Drupal version 10.1.x. The patch works fine. When multiple media is selected, there will be a message shown as warning and if we try to insert the selected images then the same message will be shown as en error. I have added the before and after screen recordings for reference.
Comment #10
sonam.chaturvedi commentedVerified and tested patch #8 on 10.1. Patch applied successfully and works fine.
Test Result:
When user tries to insert multiple media > Error message is displayed saying that only 1 media is allowed.
Screenshot is available in #9.
RTBC +1
Comment #11
prasanth_kp commented@Gauravvv Thanks for the patch. #8 Patch applied successfully on 10.1.x-dev and works fine for me.
Comment #12
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
This could use an issue summary update for steps to reproduce, proposed solution, screenshots, remaining tasks, etc.
Thanks.
Comment #14
anybodyComment #15
anybodyI agree this is still an issue and the currect 1 of 1 text doesn't help a lot if you don't know *which* media is selected and you can't deselect it.
Comment #16
gauravvvv commentedComment #17
adwivedi008 commentedPatch at #8 works great for 9.5.x and 10.1.x but it failing for D-10.2.x