Using 7.x-2.x of media, file entry, current dev of this

As above states, selecting current multi files doesn't work. Looking at the post data, it shows media_multiselect_fids[] as "fid, fid, fid" which is turned 'into media_multiselect_fids[]' = to string "fid, fid, fid" and seems to actually let the first fid be selected, but no others

#1 2056247-media_mutlseleted-array-1.patch751 byteshefox


hefox’s picture

Status:Active» Needs review
new751 bytes
derek.deraps’s picture

+1 using this in production. Thanks, hefox.

fangel’s picture

I will test updated modules and see if it's a recent change in Media or similar that has broken anything in Media Multiselect, and if I can reproduce then I will commit the proposed changes.

gmclelland’s picture

Thanks @hefox!

I believe this patch fixes the problem I was talking about.

In my case I have an unlimited multivalued file field. Before this patch, when you clicked "Add Media" and choose several files and then hit submit only one file would get added to the field.

After the patch I could select multiple files and hit submit and my selected files would be added to the field correctly.

I also tested this against an image field to make sure I could still select and submit multiple images and it worked as expected.

Hope that helps

fangel’s picture

Status:Needs review» Fixed

I was unable to reproduce the problem, but since it worked for me both with and without the patch, I decided to commit it. I wonder if it's a browser thing? (I test in Safari)

The commit is here: (I attributed you, hefox with the commit)

Status:Fixed» Closed (fixed)

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