Closed (fixed)
Project:
FileField
Version:
5.x-2.2
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2008 at 22:00 UTC
Updated:
30 Jan 2008 at 20:16 UTC
If you try to upload two files before submitting the form, it doesn't work. Upon clicking upload for the second file, the list of attached files disappears, the fieldset resets (at least visually) to its state when you first create a page, and the JS error "button has no properties" is thrown (drupal.js, line 31).
To recreate:
Happens on both Firefox 2.0.0.11 and IE 7 on WinXP (if it matters).
Comments
Comment #1
jpetso commentedI have seen that error when developing the JavaScript delete button, but I don't exactly remember the context. If I remember correctly, my instance of that error had nothing to do with filefield itself - but of course, that may be different here. (Although there is only one button in the whole filefield widget.)
Unfortunately, the error doesn't show up on my system, which means I can't debug it. Please post a list of the modules that you're using and the fields on that content type, and make dead sure that the Devel module is disabled. You could also try to disable some of your modules and see if the error is still there afterwards - that way, you can maybe find out which module or element is the offender (which largely increases the probability of this issue being solved).
Sorry, but I can't help much at the moment - plus, I hate debugging JavaScript. Good luck, though.
Comment #2
chanel commentedI tracked down the problem, but I don't understand why it wouldn't affect everyone. The problem is coming about because line 10 in upload.js is chopping off part of the id names: field-upload-file-attach-button becomes -attach-button, field-upload-file-attach-hide becomes -attach-hide. Unless we have different versions of upload.js, I don't why you wouldn't see the same thing. (I'm running 5.6 but it looks like upload.js hasn't been changed in over a year).
For future filefield users that run into the problem, the patch to upload.js that will fix the problem can be found at http://drupal.org/node/144032 in comment #1.
Comment #3
chanel commentedComment #4
jpetso commentedThe patch in that issue is obviously wrong and will likely break other stuff. Could you instead follow oadaeh's request and test out the patch here, then report back to the issue that you referenced?
Comment #5
chanel commentedI spoke (or typed) too soon anyway. While the patch I mentioned makes it look like it's working, it's not really -- a JS error still gets thrown and the images aren't actually uploaded. I'll check the other patch and report back on that thread.