Media library elements not selectable

Created on 2 November 2023, 8 months ago
Updated 26 March 2024, 3 months ago

Problem/Motivation

I have a Drupal site with 100s of images and videos in its media library. Occasionally, when trying to select an image to display on a page, there will be images without a select checkbox. This is fixed by flushing the cache, but the problem reappears with time.

Steps to reproduce

Fill media library with 100 or more images, then wait.

Proposed resolution

From my limited experience I would assume this is some sort of cache tags issue. It's not the browser cache because the unselectable images are consistent between users on different PCs.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: duplicate

Version

10.1 ✨

Component
MediaΒ  β†’

Last updated about 20 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Bunksly
  • πŸ‡ΊπŸ‡ΈUnited States scott_earnest

    could be duplicate of this issue:

    https://www.drupal.org/project/drupal/issues/3388913 πŸ› Media library modal field widget does not render selection checkbox after search Active

  • πŸ‡ΊπŸ‡ΈUnited States scott_earnest

    We are still experiencing this issue, and it has become a hard one to troubleshoot as with a cache clear we see the problem fixed, but later we find another search string that produces a similar result.

    So for us the issue is the same as described: missing checkboxes after using the media library name search.

    Upon inspecting these cells I can see that the placeholder for the checkbox that does not seem to get replaced - i don't see these on cells with checkboxes (see attached).

    <span class="field-content"><!--form-item-media_library_select_form--11--></span>
    

    On the media library view, here:
    - /admin/structure/views/view/media_library

    For a brief second is see the warning message "You have unsaved changes". I click save with no updates, do NOT clear the cache, and I can no longer reproduce the issue.

    This site was also a D9 -> D10 upgrade.

  • πŸ‡ΊπŸ‡ΈUnited States grgcrlsn321

    Commenting to escalate the issue. Having the same experience when searching for images in Media Library images are not selectable in grid mode. Switching back forth the checkboxes appear, but if you search and apply filters results will vary on if you can select the image based on the string name.

    I also notice another issue where the wrong image is inserted after selecting a checkbox and only happens when grid view is showing images without checkbox.

  • πŸ‡ΊπŸ‡ΈUnited States scott_earnest

    @grgcrlsn321 - this would appear to be a duplicate of:

    https://www.drupal.org/project/drupal/issues/3388913 πŸ› Media library modal field widget does not render selection checkbox after search Active

    That ticket is very active and has a testable patch.

    Closing this ticket in favor of 3388913

  • Status changed to Closed: duplicate 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States scott_earnest

    https://www.drupal.org/project/drupal/issues/3388913 πŸ› Media library modal field widget does not render selection checkbox after search Active

  • πŸ‡¦πŸ‡ΊAustralia dpi Perth, Australia
  • πŸ‡¨πŸ‡¦Canada liquidcms

    Just a comment to future self when i come looking for this again. Twig debug breaks being able to select items in the media browser.

  • First commit to issue fork.
Production build 0.69.0 2024