when I try to upload more than 20 files, only first 20 are uploaded (regardless size)

using combination:
Multiupload Filefield Widget -> Multiupload Imagefield Widget -> Galleria

also the files are loaded in strange order (always the same - 1st, 15th, 14th, 13th, 12th, 16th, 17th, 20th, 19th, 18th, 11th, 10th, 4th, 3rd, 2nd, 5th, 6th, 9th, 8th, 7th)
I'm using weight for sorting, so have to change almost all manually

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darvit’s picture

20 file limit is set in PHP;

See previous issue:
http://drupal.org/node/1345634

postak’s picture

Title: number of files seems to be limited to 20 » files loaded in strange order

ok, understand the 20 limit, thanks!
changing the title of the issue

arseniew’s picture

quick (and propobly dirty) fix for files order:

in multiupload_filefield_widget.field.inc
replace
$element_children = element_children($element, TRUE);

with
$element_children = element_children($element, FALSE);

pedromvpg’s picture

Nice! Thanks!

thatjustin’s picture

#3 Works perfectly for me. Any thing that should be watched out for? arseniew mentioned it was "dirty", but I don't know what to watch out for.

arseniew’s picture

thatjustin:

I didn't do any testing for that change, other than simply uploading files.
I have it live on my site for over a month and it seems to work right; i didnt experienced any data corruption or errors.

Only issue one user reported, was the fact that last file uploaded sometimes jump in the first place, although i wasn't able to reproduce that error.

Other thing you should watch for is updating this module, that will overwrite change made.

When im 100% sure everything works right i will try to commit this change to module.

postak’s picture

no problem with #3, works perfectly for me. thanks!

lv46gl’s picture

Hello, #3 works perfectly for me, thanks!

lolmaus’s picture

Status: Active » Needs review
FileSize
529 bytes

#3 worked flawlessly for me. Attaching a patch.

petu’s picture

Wooooohoooo!! It works!! I mean the patch from #9...

Thank a lot!

jlbellido’s picture

Status: Needs review » Reviewed & tested by the community

#9 works for me!! Thanks!!

czigor’s picture

Status: Reviewed & tested by the community » Fixed

88905fd5617c768f9a21f4f484720b4f1232ce2e Issue #1733898 File upload order

Status: Fixed » Closed (fixed)

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

cjs_’s picture

I've applied the patch and verified that the line in question has been changed, but sorting behavior remains unchanged.

I'm a bit surprised as there seems to be (other than me) unanimous success with the change.

Any thoughts on why I might still be seeing the original sort behavior?

cjs_’s picture

I've now updated to the most recent dev version of the module, in which the call to element_children() has the second argument removed entirely (thus defaulting to FALSE) and still the original, odd sort behavior persists.

czigor’s picture

You don't need to patch anything, it's in 1.14. If it is still not working, please file a new issue.

hmartens’s picture

Issue summary: View changes

Is 1.14 the development version because the module is currently sitting on 1.13?

czigor’s picture

My bad, I meant 1.13.

trevorleenc’s picture

I am still experiencing this.

I am using 7.x-1.13+1-dev (2014-May-06), and the patch in #9 was not applied, but even after applying it, I still get a funky sorting of my files, even when uploading 5-7 at a time (which makes it easier to do because of this).

I also noticed that the patch was not in 7.x-1.13 either.

edit: I've tried combinations of TRUE or FALSE on that line, and it has not made any difference...

edit #2" ok, with FALSE on that line, and if I use the browser's open files, sorting comes out just fine, however, if I drag files onto the upload field, the sorting comes out all wonky and stuff...