Closed Bug 417873 Opened 16 years ago Closed 16 years ago

CalDAV provider needs to fire onLoad

Categories

(Calendar :: Provider: CalDAV, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: browning, Assigned: browning)

Details

Attachments

(4 files)

After the recent checkin in bug 393817 the CalDAV provider no longer fires an onLoad during refresh(), and it turn out that offline support relies on an onLoad notification. Thanks to Maxime Delorme for pointing out the regression.

Since this breaks offline for CalDAV calendars, and offline is a release goal, I am requesting blocker status on this bug, and submitting patch.
Flags: blocking-calendar0.8?
Attachment #303665 - Flags: review?(philipp)
This blocks. I'll review later today.
Flags: blocking-calendar0.8? → blocking-calendar0.8+
Comment on attachment 303665 [details] [diff] [review]
fire onLoad during refresh()

Looks good, r=philipp.
Attachment #303665 - Flags: review?(philipp) → review+
patch committed on trunk and MOZILLA_1_8_BRANCH

->FIXED
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
This is causing a problem with dismissing events for me. If I create an event with an alarm the dialog box triggers and I can dismiss the alarm. However if I then immediately hit reload on the toolbar, or wait until the calendar refreshes on its own, the alarm fires again. If I comment out the line that was added in this patch I get the expected behavior of once the alarm is dismissed, it stays dismissed. One other interesting thing to note, is that if I close Thunderbird and then reopen it, the event stays dismissed and I don't get multiple alerts.
What kind of CalDAV server are you using?
Kerio Mailserver 6.5
Should have also asked: do you have caching turned on?
Afraid I don't have access to a Kerio instance, so this is hard for me to test directly.
No, I don't have caching enabled. When I get to work tomorrow I can post some debug logs from the server that show what Lightning sends to/from the server. There is a preconfigured VMWare image available at their website http://www.kerio.com/kms_download.html and a trial version as well. 
Does the patch just posted in bug 420228 (a three-line deletion) help with this?
No, unfortunately.
I've done some debugging and now I'm confused. I've attached a debug log from the server and the logs indicate that as far as the server is concerned, nothing is different between having this patch applied or not. Furthermore the files that are uploaded to the server seem the same in either case. I've attached the file before and after dismissing the event. It still remains the case that if I comment out the line from this bug everything works, otherwise I get an event I can't dismiss.
Attachment #306572 - Attachment mime type: message/rfc822 → text/plain
Attachment #306574 - Attachment mime type: message/rfc822 → text/plain
I'm starting to wonder if this isn't something more general than just dismissing alarms. Can you, for instance, create an even without a location, and then later add a location?
I can, sort of. If I add a location after creating the event, no matter what I do, it won't show up until I close and reopen Thunderbird. In fact, this appears to happen for any modification I make. Another thing that I noticed was that when the dismissal box pops up, if I hit dismiss the box doesn't automatically close. I thought this was (somewhat odd) intended behavior until I accidentally added an alarm to my Local calendar, and the dialog box then closed on the button click. One final possible item of note: when I open Thunderbird initially, the remote calendar doesn't load automatically - I have to switch to the Calendar or Task view and hit reload. Otherwise it seems to load on its own after a few minutes.
This is starting to sound suspiciously like bug 418050, which turned out to be a server-side bug. Lightning attempts to re-fetch items immediately after PUTting them, and in doing so uses a query-by-uid REPORT. If the server doesn't support the query-by-uid, you're going to get a properly-updated item on the server but not in the local memory cache. So the item will display incorrectly until you restart, at which point it will get reloaded from the server (using a different kind of query) and displayed properly.

You could test this by dump()ing the response variable in reportListener.onOperationDetail immediately after it's created. What you should see there on item modification is some XML with a single calendar-data element containing (only) the newly modified item. If you see something else I think you are looking at a Kerio bug.
What I see is the following (with the dump() inserted on a fresh profile):
-On startup, the console stays empty (At this point, the Calendar is blank)
-If I create an event, I see the XML output from it in the console window. Now the only item on the calendar is the new event. If I try to modify the newly-created event, nothing happens in the console window. However, Lightning is uploading an edited event to the server, as I can see the results immediately though the webclient.
-If I hit refresh, the calendar data fills the console window, but I don't see anything displayed on the Calendar until I hit reload again. (The second reload doesn't cause any further console activity)

The symptoms do seem similar to whats described in Bug 418050. I'm guessing at this point is probably is a Kerio Bug. I'll open a bug report with them.
You need to log in before you can comment on or make changes to this bug.