Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
Excellent addition to the media modules functionality. Thanks!
One potential bug I've noticed is that multiselecting media doesn't work after using pagination in 'view library'.
Steps:
- Click 'Add Media'
- Click 'View Library'
- Ctrl click a few items ... works no problem
- Click a number on the pagination
- Ctrl click a few items .... can only select one item
I'm using a field on a fieldable panel pane to store media items. Field type: file. Widget: Media multiselect
Thanks!
Andrew
Comments
Comment #1
fangel CreditAttribution: fangel commentedThis is likely to be a bug in the Multiselect JS code in Views - but I'll give it a shot at figuring out what goes wrong, and then we can get it fixed..
Comment #2
Andrew Edwards CreditAttribution: Andrew Edwards commentedGreat! Thanks fangel.
Comment #3
fangel CreditAttribution: fangel commentedOkay, I confirmed that this does indeed seem to be a problem (I just deployed this at our production site at work, where we have 10.000+ media-entities).
I'll look into it, and get it fixed - but it's likely an error in Media itself, so it needs to be committed there, which usually takes a while...
Comment #4
fangel CreditAttribution: fangel commentedThis was indeed an error in Media itself. I've created an issue with a patch at their issue-queue: #1848506: Media Browser parameters reset after AJAX pagination. Marking this as needs review, so people can go review the patch in the issue.
Comment #5
drzraf CreditAttribution: drzraf commentedJust tried the patch from the above bugreport:
=> only the last file is inserted into the node medias section.
Did I misunderstood the issue or overlooked something ?
Comment #6
fangel CreditAttribution: fangel commenteddrzraf: Yes - this isn't about "cross-pagination" selection, but rather, selecting multiple entries on page N where N > 1.
Its intentional that cross-pagination doesn't work, because there is no UI for displaying the values selected on previous pages. The same issue exists in cross-tab selection (select 1 on 'Library' and 1 on 'My files', only the one on your current active tab will be selected)
So the issue was "go to page two, try to select multiple, fail." This is what the above mentioned issue attempts to solve.
Comment #7
drzraf CreditAttribution: drzraf commentedok, then I can confirm that it fails without the patch and works perfectly with the patch.
Comment #8
fangel CreditAttribution: fangel commentedClosed. Media accepted my patch, so if you updated to the latest version of Media (-dev) it should now work.
Comment #9
Andrew Edwards CreditAttribution: Andrew Edwards commentedWorks perfectly. Thanks!