Bug 308566

Summary: Using a folder while IMAP agent is offline does not load folder settings (and sometimes loses them)
Product: [Applications] kmail2 Reporter: Thiago Macieira <thiago>
Component: foldersAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: korossy, montel
Priority: NOR    
Version: Git (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.9.3
Sentry Crash Report:

Description Thiago Macieira 2012-10-17 17:31:19 UTC
If you enter an IMAP folder while its agent is offline (for example, due to having no network connectivity), the per-folder settings such as aggregation and sorting controls or the preference for HTML mail are not loaded. The folder is displayed with some defaults loaded from somewhere else.

Worse, some of the settings are lost: at least the HTML preference is lost, even after connecting and reloading the folder.

Reproducible: Always

Steps to Reproduce:
1. Select an IMAP while the Akonadi agent is online
2. Change some per-folder setting, like the aggregation type, sorting order, or preference for HTML display
3. Change folders
4. Disconnect the agent (disconnecting the network or manually placing it on offline mode in Akonadi Console)
5. Select the folder again
Actual Results:  
The folder is displayed with the folder defaults. The HTML display setting is not respected and also reverts back to the default.

Expected Results:  
The per-folder settings should have been respected, even in offline mode. The settings are local (not stored on the server), but even if they were remote, they could have been cached locally.
Comment 1 Laurent Montel 2012-10-17 17:58:45 UTC
When I try to show properties in offline mode properties dialog is not shown.
Will test with a other imap not disconnect to see if I can reproduce it
Comment 2 Thiago Macieira 2012-10-17 20:50:58 UTC
Right, that's another symptom. I don't remember if it never shows the dialog, or if it does a long time later (after some timeouts).
Comment 3 Laurent Montel 2012-10-18 14:18:25 UTC
Git commit 795ae6d4969dd8162b0eb1408ce003b2389bdc8c by Montel Laurent.
Committed on 18/10/2012 at 16:16.
Pushed by mlaurent into branch 'KDE/4.9'.

Fix Bug 308566 - Using a folder while IMAP agent is offline does not

load folder settings (and sometimes loses them)

Now it doesn't timeout when it's offline.
I can't reproduce problem with settings not stored/load.
All is ok.

Reopen if you can reproduce it

FIXED-IN: 4.9.3

M  +12   -6    kmail/kmmainwidget.cpp

http://commits.kde.org/kdepim/795ae6d4969dd8162b0eb1408ce003b2389bdc8c
Comment 4 Thiago Macieira 2012-10-21 19:27:06 UTC
I cannot confirm the fix. It's still happening, with the commit applied.
Comment 5 Laurent Montel 2012-10-21 22:02:35 UTC
Ah ?
Is it still timeout ?

Wierd that it doesn't save settings.
Will continue to look at.
Comment 6 Thiago Macieira 2012-10-21 22:42:53 UTC
What timeout? This has nothing to do with the settings *dialog*. The problem is that the settings aren't loaded.
Comment 7 Laurent Montel 2012-10-24 07:47:42 UTC
"Right, that's another symptom. I don't remember if it never shows the dialog, or if it does a long time later (after some timeouts)." 
So now it's load directly or not ?

With my patch it can show dialogbox before we can't show it (or arrived after a long time).
So it's better for you or not ?
Comment 8 Thiago Macieira 2012-10-24 14:37:54 UTC
Yes, it's better. But it didn't fix the main problem that I reported: HTML preference and aggregation / sorting order settings aren't applied.
Comment 9 Laurent Montel 2012-10-24 21:50:11 UTC
Ok, will investigate it.
Comment 10 Thiago Macieira 2013-01-03 14:29:55 UTC
(In reply to comment #9)
> Ok, will investigate it.

Did you have any opportunity to investigate?
Comment 11 Denis Kurz 2016-09-24 18:21:54 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 12 Denis Kurz 2017-01-07 22:05:30 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.