Hi all
I'm confused about how the AJAX upload with the FileField module works, and I am really not sure that I can explain my problem properly, but here goes...
When viewing a node I have a comment form directly below it for the user to comment on the node. However, when somebody already submitted a comment, I wanted the "Reply" link for that comment to load another comment form using AJAX, providing an easier/faster way for users to comment on comments (threaded comments) without going to another "Reply" page and finally reloading the original node. I actually thought that I had finished the development of a module that provides exactly that functionality, as it works perfectly when entering something in the comment body field only.
However, the comment form provides not only the comment body field, but also an ImageField for uploading images along with the comment. When trying to reply to an existing comment and attaching images to it, this is what happens:
1. Click the "Reply" link related to the specific comment -> The comment form is created and loaded via AJAX.
2. Some comment body text is entered.
3. One image is uploaded -> this image ends up with thumbnail and all in the correct comment form.
4. Another image is uploaded -> this image ends up in the comment form related to the node itself (the top level comment form just below the node).
I guess, when the comment form is created (in step 1), the form is correct, but when the first image has been uploaded the FileField AJAX upload mechanism returns the new upload form inputs in a way that makes Drupal think that any subsequent uploads belong to the other comment form.
Can anybody point me in some direction for debugging this? I am really confused about how Drupal/AJAX handles the uploads.
BR & Merry Christmas :-O==
Jesper