1) Ajax submit -- on submit, plupload triggers upload of files. However, it doesn't stop any other submit handlers while doing that, so ajax submit /continues/ as plupload uploads, submitting the form. I tried adding a stop immediate propagation, but if ajax is added first (as it is when using a ctools modalframe, as the plupload js is added on modal open whereas the ajax is already added), so need to have the plupload submit handler run first.
2) (edit: see comments, was addressed in dev) Perhaps realted to #2272043: Image wont upload after size restriction warning, the ids of the element keep changing, so doesn't match the previous ids. Would there be a way it instead uses the name of the element for the new element names, instead of the id?
Comment | File | Size | Author |
---|---|---|---|
#4 | 2386741-plupload-modal-4.patch | 365 bytes | clfer |
#2 | 2386741-plupload-modal-2.patch | 565 bytes | hefox |
Comments
Comment #1
hefox CreditAttribution: hefox commentedLooks 2 was at least partially addressed via #2063161: Multi Upload with plupload broken when using Drupal 7.23, though I worry if about multiple forms of same type on same page, not sure that'll work with that logic but haven't tested it
Comment #2
hefox CreditAttribution: hefox commentedPatch for 1), reordering it so plupload submit goes before ajax.
Comment #3
csedax90 CreditAttribution: csedax90 commentedI've a problem with the latest patch and jQuery Dialog, when I do:
the form is rendered correctly in my div but the latest ajax_command_invoke is ignored.
If I remove the latest patch line, the command is invoked, but the plupload submit doesn't work...
Comment #4
clfer CreditAttribution: clfer at Smile commented#2 patch will only stop propagation when the submit trigger the file upload.
When autosubmit is enabled, ajax submit is still triggered even if file upload has not ended.
I think we should stop propagation whenever pluploadform submit function try to return false.
(No idea for #3 sorry)
Comment #5
A---- CreditAttribution: A---- commented$(this).data('events')
doesn't work since jQuery 1.7. You can use the unsupported$._data(this, 'events')
that works (for now):