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 name and name_1 in 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

Ibrahim Tameme created an issue. See original summary.

ibrahim tameme’s picture

Issue summary: View changes
ibrahim tameme’s picture

Updating the media library widget view mode change the issue and make it less likely to occur.

rajab natshah’s picture

Title: Varbase Media library does not render selection checkbox after search » Fix not rendered selection checkbox for Media Library grid widget after searching
ibrahim tameme’s picture

Issue summary: View changes
rajab natshah’s picture

Priority: Major » Normal
Related issues: +#3388913: Checkbox for Media library modal missing after search
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

No patch fix for this from Drupal 10 Core yet
We may have to provide the fix as a patch file for them too.

rajab natshah’s picture

I 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 with
And I press the "Apply filters" button

After 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

  • name="media_library_select_form[23]"
  • value="905"

<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

  • name="media_library_select_form[23]"
  • value="897"

<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">

rajab natshah’s picture

Assigned: ibrahim tameme » Unassigned
Priority: Normal » Major

Chaining priority to Major

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Hitting this issue when Aggregate JavaScript files is ON
When aggregation for js is off it has the default right behavior

rajab natshah’s picture

Still when changing the number of Items filter to show more or less

rajab natshah’s picture

When 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

rajab natshah’s picture

Maybe 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

rajab natshah’s picture

Issue summary: View changes

  • Rajab Natshah committed 9cc280d9 on 10.0.x
    Issue #3398691: Fix not rendered selection checkbox for Media Library...

  • Rajab Natshah committed d9653607 on 9.0.x
    Issue #3398691: Fix not rendered selection checkbox for Media Library...

  • Rajab Natshah committed 2d11003c on 10.0.x
    Issue #3398691: Fix not rendered selection checkbox for Media Library...
rajab natshah’s picture

Issue summary: View changes

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.

  • Rajab Natshah committed 812d1a44 on 10.0.x
    Issue #3398691: Fix not rendered selection checkbox for Media Library...

  • Rajab Natshah committed 1db19d18 on 9.0.x
    Issue #3398691: Fix not rendered selection checkbox for Media Library...
rajab natshah’s picture

✅ Released varbase_core-10.0.0-rc6

Issue #3398817: Added Views Date Filter ~1.0.0 module, Enabled it and change default configs for Date Filters

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.

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-9.0.17, +varbase_media-9.0.32, +varbase-10.0.0-rc1, +varbase_media-10.0.0-beta4
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.0.17

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-10.0.0-rc1