Problem/Motivation
Using media library when I search some images might appear without select checkbox, this issue is not consistent and might occur in different cases.
Link to the original issue on core: https://www.drupal.org/project/drupal/issues/3388913
Steps to reproduce
Add content type or content block.
Add field with media library format.
Create new instance of the content type/block.
Search for image and change item count.
Proposed resolution
- Update the Sort field identifier with
nameandname_1in the default configs - Fix the Author on and create date from and to filters
- Add a hook update for both Varbase 9 and Varbase 10 to fix this issue for old Drupal 9 sites, to work with Drupal 10 after upgrading
or with Drupal 10 on install.
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ✅ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-9.0.17, varbase_media-9.0.32, varbase-10.0.0-rc1, varbase_media-10.0.0-beta4
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Issue #3398691 by Ibrahim Tameme: Fixed not rendered selection checkbox for Media Library grid widget after searching
Comments
Comment #2
ibrahim tameme commentedComment #3
ibrahim tameme commentedUpdating the media library widget view mode change the issue and make it less likely to occur.
Comment #4
rajab natshahComment #5
ibrahim tameme commentedComment #6
rajab natshahComment #7
rajab natshahComment #8
rajab natshahNo patch fix for this from Drupal 10 Core yet
We may have to provide the fix as a patch file for them too.
Comment #9
rajab natshahI confirm having this issue
Feels that this is not one issue, maybe 2 or more issues in one case setup or after an update for Drupal 10 core
When I fill in the
"Name"filter field withAnd I press the
"Apply filters"buttonAfter that hit of AJAX for filters
I'm able to reproduce the issue of selecting one media item ( type of media image )
and getting another one in the filed.
Only
Having a media library select form order checkbox as 23 for example with value for the media id 905
Before the AJAX filter
<input data-drupal-selector="edit-media-library-select-form-23" type="checkbox" id="edit-media-library-select-form-23--R90go40dnks" name="media_library_select_form[23]" value="905" class="form-checkbox form-boolean form-boolean--type-checkbox" data-once="media-library-click-to-select media-item-change">After the AJAx filter
<input data-drupal-selector="edit-media-library-select-form-23" type="checkbox" id="edit-media-library-select-form-23--z_RRpXFgoaA" name="media_library_select_form[23]" value="897" class="form-checkbox form-boolean form-boolean--type-checkbox" data-once="media-library-click-to-select media-item-change">Comment #10
rajab natshahComment #11
rajab natshahChaining priority to Major
Comment #12
rajab natshahComment #13
rajab natshahHitting this issue when Aggregate JavaScript files is ON
When aggregation for js is off it has the default right behavior
Comment #14
rajab natshahStill when changing the number of Items filter to show more or less
Comment #15
rajab natshahWhen Allowing for Mini pager options has

"Allow user to control the number of items displayed in this view"The Sort criteria for Sort by is not showing up
find out that old configs has an empty identifier for the name sort criteria too
Sort field identifier ( name )

Sort field identifier ( name_1 )

Find out that both of them were empty
Comment #16
rajab natshahMaybe this issue is about when having an old config for Drupal 9 been upgraded to Drupal 10
or used as it was in the old config sync.
Updating the Sort field identifier and saving the view fixed this in my case
Comment #17
rajab natshahComment #20
rajab natshahComment #22
rajab natshahAdd a hook update for both Varbase 9 and Varbase 10 to fix this issue for old Drupal 9 sites, to work with Drupal 10 after upgrading
or with Drupal 10 on install.
Comment #25
rajab natshah✅ Released varbase_core-10.0.0-rc6
The old config and old JQuery UI date picker had issues with Media Library.
Switched Date filters to default config for Content, People, and Media Library Grid/Table views to the default Drupal's HTML date filter, which the Views Date Filter module is updating using.
Comment #26
rajab natshahComment #27
rajab natshahComment #28
rajab natshahComment #29
rajab natshah✅ Released varbase_media-9.0.32
Comment #30
rajab natshah✅ Released varbase_media-10.0.0-beta4
Comment #32
rajab natshah✅ Released varbase-9.0.17
Comment #33
rajab natshah✅ Released varbase-10.0.0-rc1