Last Comment Bug 696334 - Sometimes sort order of calenders list changes
: Sometimes sort order of calenders list changes
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Calendar Views (show other bugs)
: Lightning 1.0b7
: All All
-- normal with 1 vote (vote)
: 4.3
Assigned To: Decathlon
:
:
Mentors:
: 663697 783192 963924 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-21 00:54 PDT by Alexander Stohr
Modified: 2016-01-10 04:55 PST (History)
15 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fix issue in comment 15 (739 bytes, patch)
2015-05-24 05:17 PDT, Decathlon
philipp: review+
Details | Diff | Splinter Review

Description User image Alexander Stohr 2011-10-21 00:54:04 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

(using lightning as a plugin for thunderbird)
imported several network based calender files,
assigned colors and options to calenders,
moved calenders up and down in listing pane,
clicked to e-mail listing
clicked to calender listing


Actual results:

previously achieved listing order vanished


Expected results:

listing order as previousely set should stay.
Comment 1 User image Martin Schröder [:mschroeder] 2011-10-25 10:47:54 PDT
Alexander, what do you me with "clicked to e-mail listing" and "clicked to calender listing". At which point the manual sorting order is restored to the original one?

Cannot reproduce on Mac OS X with Lightning 1.0b7.
Comment 2 User image Felix Möller 2012-08-25 15:37:04 PDT
*** Bug 783192 has been marked as a duplicate of this bug. ***
Comment 3 User image Felix Möller 2012-08-25 15:39:05 PDT
*** Bug 663697 has been marked as a duplicate of this bug. ***
Comment 4 User image Felix Möller 2012-08-25 15:41:27 PDT
Does anyone have steps to reliably reproduce this issue?

I have tested it on my Lightning 1.7b3, Thunderbird 15, Ubuntu 12.10 installation and cannot reproduce...
Comment 5 User image Erwin Bauer 2013-01-29 11:24:41 PST
I can confirm this rather nasty behavior on Ubuntu as well as on Windows, it's hitting me since the last couple of releases of Thunderbird + Lightning! I can not reliably reproduce at will, but it happens to me at least once a week, when closing and re-opening Thunderbird the sorting order of calendars gets messed up.

I'm using a dozen of remote CalDAV calendars (only few of them are enabled at the same time) and some local calendars.

Let me know if and how I can provide some logs to pin down this issue!
Comment 6 User image Laurent Bauvens 2013-03-19 06:32:08 PDT
I have a long list of calendars to manage and I manually sorted them. And from time to time Lightning resets my sort order and also each calendar color.

This is a behavior which drives me crazy because I must spend time to reorder manually all my calendars. I have abandoned the restoration of calendar colors because this takes too time. 

No need to say that stable calendar display order and colors are really important to reach efficiency in calendaring.

This is a behavior I experience for a long time with Lightning (at least from 0.7 to current 1.9 with TB 17.0.4 for Windows).

This behavior is produced randomly. I mean I can't relate it with a particular trigger. For example, all was well yesterday evening when I stopped Thunderbird and this morning, when I started Thunderbird, I saw my calendar list unsorted.

Note that almost all of my calendars are WCAP calendars.

Thanks
Comment 7 User image Decathlon 2013-03-19 08:19:11 PDT
@Erwin Bauer @Laurent Bauvens
could you try to copy and store somewhere the preference  "calendar.list.sortOrder" (menu tool->Options->Advanced -> tab general -> button Config Editor...) and see if it has changed or it is messed up when you find out the issue (just after the first time it will happen)?
Comment 8 User image Laurent Bauvens 2013-03-19 09:38:21 PDT
(In reply to Decathlon from comment #7)

Backup done. Awaiting the bug. That could take time before it is back.
Comment 9 User image Stefan Sitter 2013-03-20 01:04:18 PDT
This might be problem with WCAP provider. If I recall correctly the WCAP provider will automatically subscribe you to all your calendars on the WCAP server. Maybe the calendar collection on the server changed and this triggers the WCAP provider to unsubscribe from the old calendars and subscribe to the new calendars. Therefore associated information like order and color is lost.
Comment 10 User image Laurent Bauvens 2013-03-20 06:55:37 PDT
(In reply to Stefan Sitter from comment #9)
> If I recall correctly the WCAP provider will automatically subscribe
> you to all your calendars on the WCAP server. 

Yes, Lightning does that.

> Maybe the calendar collection on the server changed and this
> triggers the WCAP provider to unsubscribe from the old calendars and
> subscribe to the new calendars. Therefore associated information like order
> and color is lost.

AFAIK, WCAP provider duplicates WCAP subscriptions only once, when you set up your own (primary) WCAP calendar. After that no other WCAP subscriptions are made and calendar subscriptions in Thunderbird and Oracle/Sun Web Client are totally independent.
For example, I have 22 subscriptions within Oracle Web Client and 29 within Lightning (+ few other local calendars). Yesterday when Lightning has resetted my sort order, all of the 29 WCAP calendars were yet there.

Moreover I haven't use Oracle Web Client for weeks so I haven't do any change which could trigger the problem in Lightning.
Comment 11 User image Erwin Bauer 2013-04-15 07:13:38 PDT
(In reply to Decathlon from comment #7)
> @Erwin Bauer @Laurent Bauvens
> could you try to copy and store somewhere the preference 
> "calendar.list.sortOrder" (menu tool->Options->Advanced -> tab general ->
> button Config Editor...) and see if it has changed or it is messed up when
> you find out the issue (just after the first time it will happen)?

@ Decathlon: I've checked "calendar.list.sortOrder" as my calendar sort order is once again messed up, it has (partly) changed compared to the backup I took of my orginal sort order. Additionally, replacing the contents of "calendar.list.sortOrder" with the backup value restored my original sort order after restarting Thunderbird.

So, someone/something seems to mess with "calendar.list.sortOrder", maybe this helps to track down this issue?!
Comment 12 User image Decathlon 2015-05-11 01:56:26 PDT
*** Bug 963924 has been marked as a duplicate of this bug. ***
Comment 13 User image Decathlon 2015-05-11 02:05:32 PDT
It happens to me with a quite long list of local calendars, but I can't reproduce anymore.
Does someone find some kind of pattern for the reproducibility?
Comment 14 User image montagnersylvain 2015-05-12 03:25:35 PDT
Same for me, randomly, with about 40 calendar on a local network server.
Comment 15 User image Decathlon 2015-05-24 01:55:44 PDT
This bug might be related to the way the preferences are saved in Thunderbird.
The preferences in the Options dialog get saved in the file prefs.js just after the user changes them or when the dialog is closed, instead, the sort order preference, as far as I can see, is saved only when TB exits unless another preference from the Options dialog is changed in the same session after the sort order preference.

If TB's session ends in an anomalous way, the preference is not saved and the last sort order gets lost. At the next restart, TB loads the previous saved order.
In my case I closed TB by closing the console window (TB's profile started with the "-console" option) and in this way a new sort order is never saved (the bug is always reproducible).
The same might happen e.g. with a crash or by killing TB's process with the OS ..., if the calendars list had been changed during those sessions, the new sort order gets lost.
Comment 16 User image Decathlon 2015-05-24 05:17:11 PDT
Created attachment 8609837 [details] [diff] [review]
fix issue in comment 15

This patch fixes the issue mentioned in comment 15 by writing the new calendar list in the prefs.js file just after the order has been changed by the user.
Even if it isn't the cause of the bug, the patch makes anyway the process safer.
Comment 18 User image alexcoloc 2015-11-23 04:37:41 PST
Same problem with 58 calendars.

I don't understand how to use the patch ?
Comment 19 User image montagnersylvain 2015-11-23 05:32:42 PST
I meet still regularly this problem, and I either do not know how to apply this patch.
Comment 20 User image Decathlon 2015-11-23 07:42:11 PST
The patch in comment #16 is available starting from Lightning 4.3, what version do you use?
Comment 21 User image montagnersylvain 2015-11-24 07:42:39 PST
I use Lightning 4.0.3.1 under TB 38.3.0.
I don't know how to use a patch, and if you mean that problem is solved with Lightning 4.0.3.1, this is not effective.
Just today, I encountered the problem after a forced closure of Thunderbird...
All my calendars (about 40), previously ordered by name, are now classified randomly ...
Comment 22 User image Stefan Sitter 2015-11-24 11:11:45 PST
This bug was fixed for Lightning 4.3 Beta for Thunderbird 41 Beta. You are using Lightning 4.0.3 for Thunderbird 38 and therefore you don't have the fix yet. You will have to wait for the next stable release or switch to Beta test builds.

Note You need to log in before you can comment on or make changes to this bug.