modoboa-amavis icon indicating copy to clipboard operation
modoboa-amavis copied to clipboard

Quarantine list empty after deletion of multiple messages

Open tonioo opened this issue 8 years ago • 9 comments

From @TacoScheltema on May 26, 2017 7:23

Impacted versions

  • Modoboa: 1.7.4
  • Amavis Frontend: 1.1.2
  • installer used: Yes
  • Webserver: Nginx
  • Browser used: Chrome on OSX 58.0.3029.110 (Official Build) (64-bit)

Steps to reproduce

when there are multiple messages in quarantine (in my case there were over 60), then using the selector at the top of the page to select all messages with bad headers (which in my case selects all but 2 messages) and click the Delete button.

Current behavior

Quarantine page does not list any remaining messages. when navigating to the quarantine page again it does show the 2 remaining messages

Expected behavior

Quarantine page should show the messages that are left in quarantine after removing the selected message, in this case 2 spam messages. This is not a major issue and may not happen in every browser (haven't been able to test other browsers yet, I'll do some more testing once I have messages in quarantine again)

Copied from original issue: modoboa/modoboa#1129

tonioo avatar Jun 01 '17 08:06 tonioo

From @TacoScheltema on May 26, 2017 7:43

I just tested this with the same versions as mentioned above with 2 messages in quarantine. I deleted one message, the second messages stays on the page as expected. Will test some more this weekend.

tonioo avatar Jun 01 '17 08:06 tonioo

From @TacoScheltema on May 27, 2017 13:37

Tested again today, this time with safari Version 10.1 (12603.1.30.0.34) on OSX. About 100-120 messages in quarantine. selected 25 messages and deleted those. the remaining messages stay visible as expected. then repeated the same action on chrome on OSX; the quarantine page is empty. a reload of the quarantine page will show the remaining messages again. I've also done the same test on chrome 58.0.3029.110 (64-bit) on Windows 10, after deleting the page shows up empty too. On windows 10 using Internet Explorer 11 it works as expected so this seems to be an issue with Chrome only.

tonioo avatar Jun 01 '17 08:06 tonioo

Thank you for reporting, I'll look into it asap.

tonioo avatar Jun 01 '17 08:06 tonioo

@TacoScheltema I can't reproduce this issue... would be really helpful if you could retry this on chrome with a javascript debugger open, I guess there is a javascript issue behind this.

tonioo avatar Jun 30 '17 15:06 tonioo

@tonioo, I just tried this again with the debugger open but couldn't reproduce it either. I'll have to wait till my quarantine has a substantial amount of messages, then I'll try again.

TacoScheltema avatar Jul 02 '17 07:07 TacoScheltema

@TacoScheltema Is it still happening?

tonioo avatar Oct 19 '17 17:10 tonioo

Hi Tonioo,

It is still happening, see the link below for a screen recording. Unfortunately I didn't have the javascript debugger on at the time. To reproduce I started with a quarantine page with 60-70 items of mixed type (in my case spam messages, bad header messages and a bad mime message), using the select drop down at the top to select all messages with bad headers and then delete those results in an empty quarantine page, then clicking the quarantine menu item again will show the remaining messages in quarantine.

It's not a major issue to me but it's a bit confusing at times.

https://storage.private-pages.org/index.php/s/CTOeI6VmqOsVN65

TacoScheltema avatar Oct 19 '17 18:10 TacoScheltema

@TacoScheltema Thank you for the screen recording, I think I understand the issue now. If you look at the url, a page argument is added after the removal and set to 2. I guess there are not enough quarantined messages anymore to fill a second page so this is why you see this message.

tonioo avatar Oct 19 '17 19:10 tonioo

That makes sense. Would it be feasible to set the page to 1 after deletion of multiple messages and leave it as is when deleting a single message?

TacoScheltema avatar Oct 19 '17 20:10 TacoScheltema