- Issue created by @nayanalok
Unfortunately Drupal 9 is unsupported. Upgrade to a supported version and try again.
- Status changed to Closed: outdated
5 months ago 5:46pm 28 July 2024
Module: Drupal 9 media_library
Here are the steps to reproduce issue:
1. For any content type, Create a media field allowing 1 image limit for the field.
2. Create new content and click 'Add Media', you can select only one image from existing library, which is correct
3. Click on 'Choose file' and upload new image, after upload new image is by default selected (Now more than one image is selected)
4. You can repeat step 3 again and again
5. Click on 'Insert Selected'
Expected result:
1. Should not allow multiple images to be uploaded
2. User should be able to delete extra images
3. Add Media button should not be available if uploaded count is equal to or greater than allowed
Actual result:
1. There are more images uploaded than allowed limit.
2. Shows negative count for remaining images.
3. Add Media' button still available to upload more images
4. If you try to remove extra images, it throws error and doesn't remove image.
Error: Call to a member function label() on null in Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget::updateWidget() (line 703 of /var/www/html/motionCMS/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php)
Closed: outdated
9.4
Last updated
Unfortunately Drupal 9 is unsupported. Upgrade to a supported version and try again.