6.0.0-git
2019-07-18

[#13108] keep auto saved message in compose window although session is expired
Summary keep auto saved message in compose window although session is expired
Queue IMP
Queue Version 6.1.7
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester lauffer (at) ph-freiburg (dot) de
Created 2014-04-11 (1924 days ago)
Due
Updated 2014-07-09 (1835 days ago)
Assigned 2014-04-16 (1919 days ago)
Resolved 2014-07-09 (1835 days ago)
Milestone
Patch No

History
2014-07-09 06:18:30 Michael Slusarz State ⇒ Not A Bug
 
2014-04-21 19:57:03 Michael Slusarz Comment #8 Reply to this comment
ATM I only was able to reproduce a lost of an auto saved message 
with an active logout.
Auto saved drafts will not be deleted on session timeout.

If a user manually logs out in a separate window/tab/whatever, then 
yes... the auto saved draft will be deleted.  And that is the expected 
behavior.  Otherwise your drafts mailbox would have 1,000s of 
abandoned drafts.
2014-04-17 10:03:51 lauffer (at) ph-freiburg (dot) de Comment #7 Reply to this comment
ok... for sure: If we have no valid session we can not save on draft 
(server)... so my focus is on the situation when there is already an 
auto saved message in the draft folder.
.oO(in the hope of "very important mails takes more time to compose 
than TTL of auto save...")
ATM I only was able to reproduce a lost of an auto saved message with 
an active logout.

Ok. Because of the changes in the upcoming horde webgroupware I would 
say we "hold the line"... I will come back after test of the new 
version.
2014-04-16 21:16:02 Michael Slusarz Comment #6 Reply to this comment

[Show Quoted Text - 12 lines]
This is irrelevant.  If the session is expired, it won't contain any 
data, let alone the 'compose_cache' entry, so this code doesn't do 
anything.  (And I'm not even sure if this is run on a session timeout 
anyway.)
2014-04-16 21:14:10 Michael Slusarz Comment #5 Reply to this comment
Yes, we enable  "Compose messages in a separate window? (Basic view 
only)" because this is needed for the use of s/mime.
This is irrelevant for dynamic view.
And yes, in generel the message will be saved in the drafts folder 
after some minutes (or if I press the button to save in drafts...).

The problem is that some users get horde to remove/delete this 
already saved messages out of the draft (or it never was saved 
there?). If the users call us for help they tell us horde said the 
session had expired after clicking on the send button. So the 
composed message text get lost in the closing window...
This is explicitly handled in the IMP_Application#appInitFailure() ... 
if compose data is seen in a POST and there is no session, the message 
should be saved to the user's VFS backend.  (We can't save to users' 
draft mailbox, since we don't have access to the IMAP server at this 
point).

I faintly remember fixing some issues relating to session expiration 
in the near past.  Although you may need to be running (unreleased) 
Horde 5.2 and/or IMP 6.2 and/or Horde_Core to see the fixes.
The question is: Can we do anything to prevent this? I guess the 
session expired to to other user acitivity in a 2nd... 3rd... 
browser window.
This is already handled.
2014-04-16 14:34:07 lauffer (at) ph-freiburg (dot) de Comment #4 Reply to this comment
Ok... the auto saved message in draft got deleted in during the logout 
session. So I searched for a task like this and found something in 
imp/lib/Application.php round about line 163.:

    public function logout()
     {
         /* Clean up dangling IMP_Compose objects. */
         foreach (array_keys($GLOBALS['session']->get('imp', 
'compose_cache', Horde_Session::TYPE_ARRAY)) as $key) {
             
$GLOBALS['injector']->getInstance('IMP_Factory_Compose')->create($key)->destroy('cancel');
         }

At the moment my idea would be to temporare remove this foreach().

Question: Are there some known, seriously side effects by doing this?

Maybe I should go deeper and just only find the part where saved 
message in draft got deleted?
2014-04-16 12:08:44 lauffer (at) ph-freiburg (dot) de Comment #3 Reply to this comment
Yes, we enable  "Compose messages in a separate window? (Basic view 
only)" because this is needed for the use of s/mime.

And we use the dynamic view (set on the login mask) as default This 
compose window in dynamic view is working (and looks different as 
using it in the basic mode). So the notice "Basic view only" seems to 
be puzzeling.

And yes, in generel the message will be saved in the drafts folder 
after some minutes (or if I press the button to save in drafts...).

The problem is that some users get horde to remove/delete this already 
saved messages out of the draft (or it never was saved there?). If the 
users call us for help they tell us horde said the session had expired 
after clicking on the send button. So the composed message text get 
lost in the closing window...

The question is: Can we do anything to prevent this? I guess the 
session expired to to other user acitivity in a 2nd... 3rd... browser 
window.

We tell our users not to open more than one horde tab or window at 
once. But can we do something in Horde...? Testting for a working 
session before closing the compose window? Whatever...



2014-04-16 09:50:18 Jan Schneider Type ⇒ Bug
State ⇒ Feedback
Priority ⇒ 1. Low
 
2014-04-16 09:50:06 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Compose messages are already automatically saved to drafts regularly, 
and when changed. Are you saying this isn't working? And since the 
preference to write messages in a new window only exists in the basic 
mode, are you using that? Does it work correctly in the other mode?
2014-04-11 10:23:52 lauffer (at) ph-freiburg (dot) de Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ keep auto saved message in compose window although session is expired
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
Some users reported problems with expired sessions during composing a 
new message (we use new windows as default for that because of the use 
of s/mime).

In this case the typed in mail text gets lost in space after klicking 
on the send button.

We would be very pleased if there is a way to save the message text in 
draft, or not to close the window... to find a way not to lost the 
already composed message text.

Poorly we don't know right now how to reproduce this kind of expired 
sessions. But regardless of this we think there should be a way to 
save the mail text in any way... (btw. I remember the OTRS ticket 
system which is very strickt and disallows opening more than one 
window. If you try so you get be asked if the other window should be 
closed or the new not opened... a solution for horde?)

Saved Queries