View Issue Details

IDProjectCategoryView StatusLast Update
0002182SOGo Connectorwith SOGopublic2013-06-25 15:13
Reporterwimmer Assigned To 
PrioritynormalSeveritymajorReproducibilitysometimes
Status closedResolutionfixed 
Summary0002182: Troubles with Lightning cache
Description

I found issue in TB-17 with Lightning-1.9.
Sometimes when I try to modify or delete some older events,
Lightning changes nothing and writes following messages into Error Console:

Error: this.mItemInfoCache[aNewItem.id] is undefined
Source file: file:///home/wimmer/.thunderbird/p4lfr6ld.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calDavCalendar.js
Line: 660
(what means "let wasInboxItem = this.mItemInfoCache[aNewItem.id].isInboxItem;"

Error: this.mItemInfoCache[aItem.id] is undefined
Source file: file:///home/wimmer/.thunderbird/p4lfr6ld.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calDavCalendar.js
Line: 792
(what meas "} else if (aFromInbox || this.mItemInfoCache[aItem.id].isInboxItem) { ")

I tried to use "Reset Calendar Cache" many times. It helps for a while only.
I tried to use fresh new Thunderbird profile - the same issue.
I can modify/delete the same Event in WebGUI without problem.
No problem with Events created in the current day.

This issue affects many our users with TB-17.
Users with TB-10 have not this problem.

TagsNo tags attached.

Activities

ludovic

ludovic

2013-01-16 11:51

administrator   ~0005199

Please report this issue to Mozilla/Lightning. We no longer modify Lightning.

ludovic

ludovic

2013-01-16 19:53

administrator   ~0005204

Try the patches available from https://bugzilla.mozilla.org/show_bug.cgi?id=827078

Actually you can simply apply the first patch and instead of applying the second, apply my version which is attached to this email. It will apply cleanly to Lightning 1.9 (for TB17).

2013-01-16 19:53

 

calDavCalendar.js.patch (2,849 bytes)   
254a255,283
>     ensureMetaData: function caldav_ensureMetaData() {
>         let self = this;
>         let refreshNeeded = false;
>         let getMetaListener = {
>             onGetResult: function meta_onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {
>                 for each (let item in aItems) {
>                     if (!(item.id in self.mItemInfoCache)) {
>                         let path = self.getItemLocationPath(item);
>                         cal.LOG("Adding meta-data for cached item " + item.id);
>                         self.mItemInfoCache[item.id] = { etag: null,
>                                                          isNew: false,
>                                                          locationPath: path,
>                                                          isInboxItem: false};
>                         self.mHrefIndex[self.mLocationPath + path] = item.id;
>                         refreshNeeded = true;
>                     }
>                 }
>             },
>             onOperationComplete: function meta_onOperationComplete(aCalendar, aStatus, aOpType, aId, aDetail) {
>                 if (refreshNeeded) {
>                     // reseting the cached ctag forces an item refresh when
>                     // safeRefresh is called later
>                     self.mCtag = null;
>                 }
>             }
>         };
>         this.mOfflineStorage.getItems(calICalendar.ITEM_FILTER_ALL_ITEMS,
>                                       0, null, null, getMetaListener);
>     },
257,258c286,287
<         var cacheIds = {};
<         var cacheValues = {};
---
>         let cacheIds = {};
>         let cacheValues = {};
262,266c291,293
<         let needsResave = false;
<         let calendarProperties = null;
<         for (var count = 0; count < cacheIds.length; count++) {
<             var itemId = cacheIds[count];
<             var itemData = cacheValues[count];
---
>         for (let count = 0; count < cacheIds.length; count++) {
>             let itemId = cacheIds[count];
>             let itemData = cacheValues[count];
282,285c309,312
<                 var itemDataArray = itemData.split("\u001A");
<                 var etag = itemDataArray[0];
<                 var resourcePath = itemDataArray[1];
<                 var isInboxItem = itemDataArray[2];
---
>                 let itemDataArray = itemData.split("\u001A");
>                 let etag = itemDataArray[0];
>                 let resourcePath = itemDataArray[1];
>                 let isInboxItem = itemDataArray[2];
288c315
<                     var locationPath = resourcePath
---
>                     let locationPath = resourcePath
290c317
<                     var item = { etag: etag,
---
>                     let item = { etag: etag,
297a325
>         this.ensureMetaData();
calDavCalendar.js.patch (2,849 bytes)   
wimmer

wimmer

2013-01-17 16:20

reporter   ~0005219

Yesterday I distributed patched Lightning to our users and I'm receiving positive feedbacks only ;-)

Ludovic, thank you very much for your excellent support.

ludovic

ludovic

2013-06-25 15:13

administrator   ~0005697

Fixed by Mozilla folks.

Issue History

Date Modified Username Field Change
2013-01-16 11:37 wimmer New Issue
2013-01-16 11:51 ludovic Note Added: 0005199
2013-01-16 19:53 ludovic Note Added: 0005204
2013-01-16 19:53 ludovic File Added: calDavCalendar.js.patch
2013-01-17 16:20 wimmer Note Added: 0005219
2013-06-25 15:13 ludovic Note Added: 0005697
2013-06-25 15:13 ludovic Status new => closed
2013-06-25 15:13 ludovic Resolution open => fixed