La Vita è Bella

Tuesday, August 12, 2008

Note: how to delete an error calendar in Lightning

As Bug #428274, I can't accept any meeting requests sent to my work mailbox, and have to add the meetings into Lightning manually. This is really annoying. As the bug got fixed, I decided to upgrade Lightning to a 0.9pre nightly to get it working.

After upgrading, the following error dialog will greet me every time I start Thunderbird:

The error message after I upgrade Lightning to 0.9pre nightly

I googled this error message and found that it was caused by the incompatible extension ThunderBirthDay. OK, delete the calendar should fix it. No! The calendar was hide from Lightning's calendar list!

Fine, downgrade Lightning and then remove the calendar should work. But unfortunately, Lightning 0.9 have changed the storage format and can't downgrade to 0.8 anymore.

So how to delete that calendar? Maybe I should delete the calendar direct from Lightning's storage. According to the official FAQ, it's stored as an SQLite database file.

Under Thunderbird's profile directory, I got a "storage.sdb" file. I tried to use the command line sqlite to open it, and it works:

$ sqlite3 storage.sdb 
SQLite version 3.5.0
Enter ".help" for instructions
sqlite> .tables
cal_attachments              cal_metadata               
cal_attendees                cal_properties             
cal_calendar_schema_version  cal_recurrence             
cal_calendars                cal_relations              
cal_calendars_prefs          cal_todos                  
cal_calmgr_schema_version    cal_tz_version             
cal_events                 

The "cal_calendars" table seems to be the one I'm looking for:

sqlite> select * from cal_calendars;
1|storage|moz-profile-calendar://
2|thunderbirthday|moz-abmdbdirectory://abook.mab

Yes it is! so I need to know how to delete that record:

sqlite> .schema cal_calendars
CREATE TABLE cal_calendars (id INTEGER PRIMARY KEY, type TEXT, uri TEXT);

OK, then this should work:

sqlite> delete from cal_calendars where type = "thunderbirthday";
sqlite> select * from cal_calendars;
1|storage|moz-profile-calendar://

It DOES work!

Now my Thunderbird is quiet on starting.

But, the guys in Lightning really should give a chance to delete calendars that aren't compatible. I should file a bug for it. I've filed Bug #450121!



tags: , , ,

00:51:44 by fishy - opensource - Permanent Link

Revision: 1.3/1.3, last modified on 2008-08-11 @ 02:04.

Karma: 29 (63.30% out of 109 were positive) [+/-]

You can subscribe to RSS 2.0 feed for comments and trackbacks

Trackbacks:
There are currently no trackbacks for this item.
Use this TrackBack url to ping this item (right-click, copy link target). If your blog does not support Trackbacks you can manually add your trackback by using this form.

maxs simmonds

maxs simmonds wrote:

Just moved the storage.sdb file to another extension, and I could downgrade to 0.8.

Wednesday, October 29, 2008 20:01:06

fishy

fishy wrote:

@maxs simmonds: yep but that will delete my old calendars, too.

Wednesday, November 05, 2008 14:46:40

Adam

Adam wrote:

Thanks for this - removing that entry cured my error too! BUT ... I found an easy way to do it ... install the SQLITE Manager extension in Firefox, then open the storage.sdb database ... then remove the offending entry!

Wednesday, March 18, 2009 08:00:39

Peter Lomax

Peter Lomax wrote:

Thunderbird 17.0.2
Lightening 1.9
I had the same problem with an event that kept occurring every 5 minutes.
I tried dleeteing the event locally - it would not disappear.
I logged on to the central master calendar and deleted it - company calendar - beehive
However the event was still on the local calendar.
SQLITE manager add on did the trick.
cal_events found the title and deleted it.

Wednesday, February 06, 2013 17:56:55

Add Comment

 

May the Force be with you. RAmen