Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | 2056247-media_mutlseleted-array-1.patch | 751 bytes | hefox |
Comments
Comment #1
hefox CreditAttribution: hefox commentedComment #2
hawkeye.twolf+1 using this in production. Thanks, hefox.
Comment #3
fangel CreditAttribution: fangel commentedI 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.
Comment #4
gmclelland CreditAttribution: gmclelland commentedThanks @hefox!
I believe this patch fixes the problem https://drupal.org/node/1903780#comment-7653465 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
Comment #5
fangel CreditAttribution: fangel commentedI 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: http://drupalcode.org/sandbox/fangel/1652676.git/commit/f4fbe71 (I attributed you, hefox with the commit)