There is something wrong with the attach button in the issues comments. Happened twice today:
Any change in the issue description is discarded after clicking on the attach button.

possible repro:
1. open an issue
(add description if you want)
2. attach a file to the issue comment
3. change the description field
(I am not sure if I clicked preview here or before)
4. save the comment

bug: the changes in point 3 are not saved.

CommentFileSizeAuthor
#3 379470-test.txt12 bytesdww
#2 379470-test.txt12 bytesdww
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pasqualle’s picture

sorry, I mean the comment field, not description field..

dww’s picture

FileSize
12 bytes

Testing if I can reproduce this

dww’s picture

FileSize
12 bytes

Testing again.
This time with a preview...

dww’s picture

Project: Drupal.org infrastructure » Comment Upload
Version: » 6.x-1.x-dev
Component: Drupal.org module » Code
Issue tags: +drupal.org upgrade

Wow, yup. #2 was supposed to have another line that I added between when I attached the file and pressed "Save". #3 has the extra line I added, but only because I previewed the comment first.

Furthermore, I could reproduce this locally, not just on d.o. Which means it really is a bug in the code somewhere, not just a d.o configuration problem. ;)

Given that we're talking the attach button here, I'm assuming this is a comment_upload bug, not project_issue. But, I could be wrong... ;) If so, we can reclassify to project_issue.

Heine’s picture

Title: attach button in issues » Change in the issue description is discarded after clicking on the attach button
Priority: Normal » Critical
netaustin’s picture

Assigned: Unassigned » netaustin
dww’s picture

Note: netaustin was able to reproduce this a) on his laptop and b) not using project issue nodes at all. Definitely a comment upload bug. He's pretty sure he knows how to fix it, and we should have a patch deployed tomorrow afternoon for testing.

sun’s picture

Confirming.

introfini’s picture

I also can confirm this issue without using project module.

introfini

hass’s picture

+

netaustin’s picture

Status: Active » Fixed

Fixed in 1.7.2.22, new alpha release cut.

dww’s picture

Issue tags: +needs drupal.org deployment

Thanks for the fix! Now we just have to test this and deploy it on d.o. ;)

dww’s picture

Status: Fixed » Needs work

From Druplicon in IRC:

Druplicon: dww: 23 hours 50 min ago tell dww that the fix to comment_upload introduces a minor problem with the project changer ahah bit in project_issue and that the latest version of comment_upload probably shouldn't be deployed until the problem is solved.

@netaustin: Please use issues to communicate such things -- there's no guarantee I'll see such messages in IRC... ;)

I couldn't replicate what you're talking about in the above warning with a "minor problem with the project changer". Seemed to work for me... Can you be more specific about what's not working?

However, the thing that seems to be completely broken with revision 1.7.2.22 of comment_upload.module is that if you try to attach multiple files to the same comment, the first instance of the attach button works fine, but then the 2nd one hangs forever. With revision 1.7.2.21, (what's on d.o) the first works fine, the 2nd ends up doing a non-JS "preview" style attach with a new page load, the 3rd works directly via AHAH, the 4th reloads the page, etc. See #377460: AHAH enhanced comment_upload_js works for 1 attachment for more on the currently clumsy (but still functioning) behavior. However, revision 1.7.2.22 is a regression from that, since you can no longer attach more than one file at all. That's the only reason I mention it here...

Also, I notice that revision 1.7.2.22 includes a new feature -- the setting to prepend the node id to uploaded file names. Can you please not change multiple things in the same commit? ;) Always run "cvs diff" before you commit, so you see exactly what you're committing. Can we leave the code for #88911: Append node ID to project issue file attachments out of fixing this bug and deal with that in its own issue?

Thanks!
-Derek

netaustin’s picture

Status: Needs work » Fixed

Fixed in 200394. The node ID bit has been removed.

dww’s picture

Status: Fixed » Needs work

Still not working in local testing... Multiple attach sometimes hangs indefinitely. Sometimes I get a page full of JSON output at /comment-upload/js while trying to attach. Etc.

@netaustin: can I make a few requests:

A) Please post a patch for review before committing it.

B) Please get changes tested and vetted before tagging another official release.

Thanks! ;)

netaustin’s picture

Status: Needs work » Fixed

Refer to this issue and patch for the hanging attachments. The issue description is no longer discarded after clicking attach, so marking this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Status: Closed (fixed) » Active

This is still an issue. It has happened to me two times today while posting files (with descriptions) in the issue queues. Another report of it appeared here: http://drupal.org/node/377596#comment-1564986

dww’s picture

Status: Active » Postponed

The fix just needs to be deployed on d.o, as expressed via the needs drupal.org deployment tag.

However, we can't do that until we figure out WTF is going on with #441216: upload periodically hanging in Safari, Opera and perhaps others

netaustin’s picture

Status: Postponed » Fixed

Since #441216 is fixed, this is fixed also, as of 221560.

dww’s picture

Issue tags: -needs drupal.org deployment

6.x-1.0-alpha5 is now deployed on d.o.

http://drupal.org/node/445748#comment-1675652 proves this is fixed: I added the "Thanks, Gabor, for committing!" part after attaching that file, didn't hit preview, and lo, it's still there. ;)

Yay!

Status: Fixed » Closed (fixed)
Issue tags: -drupal.org upgrade

Automatically closed -- issue fixed for 2 weeks with no activity.