Closed (duplicate)
Project:
FileField
Version:
6.x-3.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2009 at 14:48 UTC
Updated:
9 Feb 2010 at 01:50 UTC
In some circumstances the progress bar doesn't show progress and just stays at "Starting upload...". When "Add another item" is clicked, any filefield fields that were shown prior to adding fields won't show progress on the progress bar.
For example, If Add another item is clisked twice, the filed created on the first click will show the progress bar but it won't update and count up. it just stays at "Starting..." until the upload finishes. In this scenario, the bar works properly in the last field added.
I verified this with a clean install of Drupal 6.13, CCK 6.x-2.5, Filefield 6.x-3.x-dev Aug-4-2009. (RHEL 3)
Comments
Comment #1
mudd commentedI just want to add a data point, and if anyone has a clue where point me to start picking at this then I'll help all that I'm able.
I noticed that when I populate say 4-5 fields and then go down them all and click Upload then I get progress bars for each only when the fields already existed (say if I edit a form and Removed them).
But if my files are ~500MB thenI only get a progress bar for the last [and pre-existing] fields whenever I use Add another item.Or, if I click each Upload but wait a couple of seconds between each, until the progress bar starts, then all if fine.This is just a guess, but here goes... It seems like some client JavaScript/jQuery function wants to look at the file (get its size?) and then contact the PHP process on the server and pass that info before it proceeds to the next file. But if the file is too big and this function can't complete in time the before the user clicks on the next file then the designed series of events is disrupted.Does that sound reasonable? How might I force a wait until the suspect function completes?
>>> EDIT: I believe there's some sort of index that's supposed to identify each field to the apache progress bar module thingie, but it's failing.<<<
Comment #2
mudd commentedIs there a simple way to disable the input field while a file is uploading? When I use
$(this).attr('disabled','disabled');in my waitSave behavior below then the upload stops and resets the field.>>> EDIT: I added
.click(function() { return false;})and this does the trick. <<<I ask because, again, I'm uploading huge files and after clicking Upload and the file starts (progress bar, etc) I can still click Browse and change the file, etc.
It seems that filefield, as awesome as it is, isn't intended for very large files (I allow files up to 10 Gig in size). ie, so long as files are small and the server/client response is snappy, nobody would care. But when files are very very large then the missing user feedback quickly becomes apparent. The trouble modes I see are mostly long periods of time when files are uploading (or being moved on the server from temp file to final location) but there's no indication of activity apparent to the user, so the user can/will in frustration click on various things (back, cancel, or reload the page).
For example:
I've been told that some of these troubles come from the parent CCK module and can't easily be fixed via Filefield, but I'm hoping that folks who are intimate with the code can help me identify 1) which of these issues are specific to each (filefield vs CCK), and 2) how I might better attack these in the short or long term, better than the method I've taken below.
So anyway, as a workaround and to not hack Filefield, I've imposed the following JS via the theme engine and my theme's script.js file. This code does the following (it's ugly, but I had to do something!):
Theme script.js file:
Comment #3
mudd commentedThis thread has had no comments by the maintainers, so I wanted to ask what you feel the status should be, such as 'not worth fixing' or 'impossible because bug is in CCK rather than FF', etc.
I realize that this module may have been written when someone needed to upload small files, but the progress bar is essential when working with huge files and so having compatibility with CCK's add-another-item feature would be super groovy.
I included some observations in #491228: Progress bar does not make progress (here)
Also, I'm eager to help fix/test/etc if somebody can steer me in the right direction. For example, how does FF correlate each fields so ajax calls can talk to PECL and track each upload? (e.g. where are the IDs stored? a JavaScript var? session var?). Perhaps I can figure out why the new field breaks the just-previously added fields.
Comment #4
quicksketchAll of the requests in this issue have been reported elsewhere. I'd be much more keen to respond to them one-by-one rather than them all being grouped together. This thread contains 3 or 4 different requests.
#435746: Progress bar not shown when Save or Add-another are clicked
#610462: Disable submit/save node during ajax-upload
#540138: Invoke each Upload button upon Node Save
#491228: Progress bar does not make progress