Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
upload.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2007 at 21:16 UTC
Updated:
30 Aug 2007 at 12:33 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedrelated issue:
http://drupal.org/node/150463 => FAPI 3 problem -upload module fails when JS is disabled
See also the JS and callback here:
http://drupal.org/node/146425 => improve book module: use nodeapi and menu API
a second select is changed based on the first - and the cached form is altered to match. That's how eaton said to do FAPI3 AJAX: http://drupal.org/node/150859 (my writeup based on IRC w/ eaton and experimentation - put into practice in the book patch)
Comment #2
dopry commentedI found we can just disable the form caching for nodes with uploads.
Comment #3
moshe weitzman commentedwould it be better to implement upload_nodeapi('presave') instead? see top of node_save(). if not, this patch looks fine to me.
Comment #4
pwolanin commentedDisabling form caching potentially breaks all AJAX callbacks - perhaps Jeff Eaton has had some new insight into this problem?
Comment #5
dopry commentedI spoke with eaton a while back, he said the work of upload_prepare might be able to be done in a validate callback now. You should be able to set $form['#rebuild'] = TRUE in the validate callback to get the form properly rebuilt during submission. I haven't had any luck getting a validate callback called on the container for the upload form that contains the file data and new upload elements, and I currently have limited time resources to work on this. If someone else wants to run with it for a bit that would be awesome, unless some time magically appears for me in the next three weeks which I doubt I won't be able to work on this issue.
Comment #6
dopry commentedActually in a quick ping pong with eaton we figured out that currently there are only a couple issues with new attachments not being rendered properly on previews in the attachment form, and other wise upload.module seems to be mostly well behaved again, except the type casting issue in the attached patch.
Comment #7
dopry commentedhow about a patch without my debugging code.
Comment #8
drewish commentedworks for me.
Comment #9
gábor hojtsyThanks, committed!
Comment #10
(not verified) commented