Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#1484044 closed Bugs (fixed)

"Move mail to trash" button does not work anymore after SVN r354

Reported by: Voyageur Owned by:
Priority: 5 Milestone: 0.1-rc1
Component: Interface Version: 0.1-beta2
Severity: normal Keywords: net site
Cc:

Description

When viewing a mail in latest SVN (currently at r356), the "Move mail to trash" button does not work anymore: clicking it just adds a '#' at the end of the URL. Going back to inbox, the button works again and deletes the mail.

This appeared in r354 "Partial client re-write with a common list class" revision of SVN

Attachments (2)

app.js.diff (1.6 KB) - added by lancey 7 years ago.
Fixes delete/move while viewing message
app.js (96.7 KB) - added by lancey 7 years ago.
SVN r359 file, with patch applied

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by Voyageur

Just noted, the "Move to" box does not work anymore either (trying to move a mail from inbox to another folder)

comment:2 Changed 7 years ago by Voyageur

  • Milestone set to 0.1-rc1
  • Version set to 0.1-beta2

comment:3 Changed 7 years ago by lancey

this.message_list doesn't get initialized at all.
If you paste this:
if (this.message_list == null) alert("no such object");
in your javascript console, it will show up there's no such object. I also see list.js is not included, and it defines the get_selection function which the Delete / move functions are using.
Something has gone wrong, but I'm not familiar enough with roundcube to fix that at this point.

comment:4 Changed 7 years ago by lancey

OK, i suppose we SHOULDN'T have message_list at all when viewing a mail. The functions should affect the current message and not use the list functions at all.

comment:5 Changed 7 years ago by lancey

  • Resolution set to worksforme
  • Status changed from new to closed

Here's a fix for this bug:
Open the app.js file, and replace each occurence of:

 var selection = this.message_list.get_selection();

with

 var selection = 0;
 if (this.message_list != null) 
 {
  selection = this.message_list.get_selection();
 }

I will attach a patch soon.

Changed 7 years ago by lancey

Fixes delete/move while viewing message

Changed 7 years ago by lancey

SVN r359 file, with patch applied

comment:6 Changed 7 years ago by lancey

Let someone review this and to SVN if the fix is appropriate.

comment:7 Changed 7 years ago by Voyageur

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Should not be closed as closed until fixed in SVN (or marked worksforme either, since a patch IS needed)

comment:8 Changed 7 years ago by Steltek

  • Resolution set to fixed
  • Status changed from reopened to closed

It looks as if a fix for this has finally entered SVN.

comment:9 Changed 7 years ago by darren1234

  • Resolution fixed deleted
  • Status changed from closed to reopened

It seems to be partially fixed between SVN 360 and 372. The client script no longer fails, and the message does get removed.

But, when you click on the delete button nothing "appears" to happen. Well it does say "Loading..." then you return to viewing the message that was just deleted. You have no idea what, if anything has happened. Clicking on the delete button multiple times does not change the behavior.

It does delete the message, but the user has no idea it happened.

Returning to the message list after clicking on the delete button may be a better response.

comment:10 Changed 7 years ago by Voyageur

And it's completely broken again as of [b6677bf9] ;)

comment:11 Changed 6 years ago by thomasb

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in Trunk [53ed1e32]

Note: See TracTickets for help on using tickets.