Comment 70 for bug 1945368

Revision history for this message
In , Richard Leger (richard-leger) wrote :

Some positive update towards a possible fix...

(In reply to Richard Leger from comment #66)
> (In reply to Anje from comment #61)
> > The issue regarding Home default calendar has not been discussed very much.
> I have suggested some troubleshooting steps here... https://thunderbird.topicbox.com/groups/beta/T948a3b1f2f93c62f-M8a0edcecc8ee0e80939c3f8b/local-calendar-events-lost in an attempt to isolate the problem with home calendar and get possible errors in the console.

As per https://thunderbird.topicbox.com/groups/beta/T948a3b1f2f93c62f/local-calendar-events-lost, Dimas confirmed encountering the **home calendar event not showing** issue after upgraded from his latest 78 (78.9.1 64bits he thinks) to 91 stable (91.0 64bits). Installed manually over the 78 in Program Files TB folder. Locale *ca* for all version. On Windows 10 Pro 21H1 with the latest Windows Defender (no other antivirus).

Following my suggestions, Dimas seemed to have isolated the problem, after disabling/enabling again the local calendar while monitoring the error console, still no event shows but in the console the following error appears (same as reported in Bug 1729664 Comment 4):

````
TypeError: item.id is null (24 times)
CalStorageCalendar.jsm:2252:9
````
When trying to add an event, no additional error appears.

Using Firefox sqlite DB manager add-on (https://addons.mozilla.org/en-GB/firefox/addon/sqlite-manager-webext/), he managed to open a copy of the local.sqlite DB and run two SQL queries:

Searched for items with null id:
````SELECT * from cal_events WHERE id IS NULL LIMIT 100````
Found one and deleted it:
````DELETE FROM cal_events WHERE id IS NULL````

Saved the database, placed it back in TB profile.

He could then
- see the home calendar events again!
- sort his calendar event invites issue (https://thunderbird.topicbox.com/groups/beta/Tcee69c120cb7f65d)
- have new event created retained in new calendar (Bug 1729664 fix not yet applied)

While the above is a possible workaround, it may not be advised to fiddle directly and manually with the sqlite DB as it may cause loss of data and discrepancy in the DB.

@Geoff, put you in copy for your information as you may be the best placed to understand why some event are set without item.id perhaps... and possibly be able to **set a routine via a patch that could automatically re-assign an item.id to any event without item.id in the local.sqlite db cal_events table** (and elsewhere where applicable)? If that is possible... Unless event with item.id NULL are *ghost* events... maybe duplicate not (properly saved?) from other events with proper item.id?

Hope the above helps the dev team fix the issue and anyone encountering it.

Regards,