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

fangel’s picture

This 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..

Andrew Edwards’s picture

Great! Thanks fangel.

fangel’s picture

Okay, 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...

fangel’s picture

Status: Active » Needs review

This 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.

drzraf’s picture

Just tried the patch from the above bugreport:

  • click add media
  • Library
  • select one file
  • click "next" (or "page X")
  • select one file while pressing the "Control" key
  • click Submit

=> only the last file is inserted into the node medias section.
Did I misunderstood the issue or overlooked something ?

fangel’s picture

drzraf: 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.

drzraf’s picture

ok, then I can confirm that it fails without the patch and works perfectly with the patch.

fangel’s picture

Status: Needs review » Fixed

Closed. Media accepted my patch, so if you updated to the latest version of Media (-dev) it should now work.

Andrew Edwards’s picture

Works perfectly. Thanks!

Status: Fixed » Closed (fixed)

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