I found a problem with the way attachments and comment previews are handled.

I start typing in the comment box of a project issue, and select an attachment (but I don't press the Attach button yet). Next, I press the Preview button. In the preview the attachment is listed, which suggests it is already uploaded. Also the list of attachments below the comment shows the attachment now. Next, I edit my comment and press the Preview button several times. After a while, I am satisfied, and press the Submit. Although everything seemed fine (the attachment was listed in the preview and below the post), my attachment is not there anymore in the final comment. Can anybody reproduce this?

CommentFileSizeAuthor
#4 some_patch_#2.patch5 bytesleop
#2 some_patch.patch5 bytesleop

Comments

leop’s picture

You see, no attachment here, while it was there in the preview.

leop’s picture

StatusFileSize
new5 bytes

here's the attachment

aclight’s picture

Status: Active » Postponed (maintainer needs more info)

I tried to reproduce this on project.drupal.org and was not able to do so. I'm not sure if that site is running the exact same version of all project* related modules though. The issue there is at http://project.drupal.org/node/188677#comment-619648

Can you provide a slightly more detailed recipe to get this? How many times do you hit the preview button? Does this happen only on the original issues that you create, or on comments to an issue, or on both? This is possibly a bug in either the core upload module (used for original issue nodes) or the comment_upload module (which is used for file attachments to comments, but this module probably also relies on the core upload module for it's functionality).

leop’s picture

StatusFileSize
new5 bytes

I tried it on http://project.drupal.org/node/188677#comment-619648, and the problem did not occur. Let's try it again here...

leop’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Hm, cannot reproduce myself, so I close the issue. Sorry for bothering you.

leop’s picture

By the way, did you notice I could actually upload a file named some_patch_#2.patch? I suppose it is on the server, but if you click on it you get the Drupal front page. I think this is caused by having a '#' in the filename. This should really be prohibited.

leop’s picture

Again I was bitten by this bug (http://drupal.org/node/227479). Just trying to reproduce...