Closed Bug 419817 Opened 12 years ago Closed 12 years ago

iMip/iTip invitation mail -> No 'Accept'/'Decline' button if WCAP or CalDAV calendar exist


(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect)

Not set


(Not tracked)



(Reporter: andreas.treumann, Unassigned)



(2 files)


- select a iMip/iTip invitation mail in your inbox


- No 'Accept'/'Decline' button visible


- the 'Accept'/'Decline' button visible should be visible


- always

First build with this bug is 20080221

Possible root cause of this bug: 379198
Flags: blocking-calendar0.8?
Have you enabled the Display Attachments Inline option?
Any calendar related messages in the Error Console?
Does this apply only to the message pane and/or the separate message window?
'View'/'Display Attachment inline' is checked, toggling this entry make no difference.

The buttons are not visible in both modes, massage pane mode and separate massage window.
Using Lightning 0.8pre (2008022620) + Thunderbird (20080226) I do see the buttons for an invitation created with the same builds.

According to Bug 419349 Comment #9 ff. and e.g. <> other users see and use the buttons in recent Lightning builds too.

I think there must be another condition here that triggers your issue. Maybe the invitation is malformed or the mime type is incorrect and Lightning doesn't detect an invitation and therefore doesn't display the buttons?
I checked this again with a new profile and the newest lightning build, and it works form me. Same with a new profile, lightning 0.7 -> then update with newest lightning build. Maybe my default profile is defect after a long time of daily lightning update and uninstall processes.

I set this issue to WFM.
Closed: 12 years ago
Resolution: --- → WORKSFORME
Flags: blocking-calendar0.8?
Keywords: regression
I can reproduce it when there's no local storage calendar in profile (I share my calendars between Lightning and Sunbird and use only local ics files)
Resolution: WORKSFORME → ---
Needs investigation! Connected to bug 419601 in some way?
Flags: blocking-calendar0.8?
There's no button if I subscribe to caldav calendar. The button is shown when there's a local storage calendar
I can reproduce it with these steps:
1)Create new profile, set up mail account, install Lightning and receive invitation mail
2)Subscribe to local ics calendar
3)Delete local storage calendar
4)Subscribe to calDAV
5)Open the invitation mail
There's no Accept/Decline button
@Omar:many thanks for you further investigation, good catch.

I checked this bug with more network calendars.

- only local storage calendars -> buttons visible

- local storage and WCAP calendar -> NO buttons
- only WCAP calendar -> NO buttons

- local storage and webdav calendar -> buttons visible
- only webdav calendar -> buttons visible

- local storage and calDAV -> buttons visible
- only calDAV -> NO buttons

- local storage and gdata -> buttons visible
- only gdata -> buttons visible

I don't think that this bug is connected to bug 419601, because deleting all WCAP and calDAV calendars in my old profile brings the buttons back.
Cc'ing Clint because it's an iTIP/iMIP issue.
According to the regression range in Comment #0 the checkins were:

The only change related to the imip bar is attachment 304185 [details] [diff] [review] from Bug 379198.

Ok I see the issue, but I'm not sure what's going on.  This happened because we now have to look for an existing event on *all* calendars that matches the given invitation's ID in order to determine if the event is an update of a previous event with the same ID.  However, in the CalDav and Wcap case, the listener in the imip-bar.js [1] that determines if this is an update or not never gets called back from a CalDav or WCAP calendar.  

I've followed the code through in Venkman, and I'm still not clear as to what is happening here and why the imip-bar listener is not called back from these providers.  It might be that the listener itself should be set up differently in imip-bar.js, I'm not sure.

I think I need Bruno, Philipp or Daniel to take a look at this and see if they can explain what is going on with the listener structures and why our line of execution doesn't ever return to the imip-bar.  

Likewise, if you add an invitation to a CalDav (or WCAP) calendar and then click on an update to that event, you won't get any indication that you're looking at an update of that event (also because this listener fails to be called).

For CalDAV, the issue is going to be that getItem() has been broken since before I knew it existed. I thought to fix it when I noticed, but at that point there were zero callers in the tree, so I moved on to real(er) bugs. This patch should fix it but is totally untested since I'm not sure I understand /how/ to test it.
Attachment #306825 - Flags: review?(ctalbert)
Summary: iMip/iTip invitation mail -> No 'Accept'/'Decline' button → iMip/iTip invitation mail -> No 'Accept'/'Decline' button if WCAP or CalDAV calendar exist
Comment on attachment 306825 [details] [diff] [review]
fix CalDAV getItem()

Tested on Mac.  This fixes the issue.  

Andreas: Do you think a similar fix could be needed for WCAP?  

BBbrowning: I think we should take your patch for the caldav calendar provider, but I think we need to keep this bug open until we're sure that the other calendar providers are OK too.
Attachment #306825 - Flags: review?(ctalbert) → review+
This blocks. We need to checkin the CalDAV patch ASAP, but we will try to fix
the WCAP side after the RC1.
Flags: blocking-calendar0.8? → blocking-calendar0.8+
Checked in Bruno's patch to CalDavcalendar.js on branch and trunk.  

Leaving bug open for future RC WCAP fix.
Also checked in on SUNBIRD_0_8_BRANCH sorry for the spam
This fixes WCAP. Quite simple, but it works and it seems items are also retrieved correctly, since I got a message that the item is already in my calendar for a wcap event.
Attachment #307572 - Flags: review?(ctalbert)
Comment on attachment 307572 [details] [diff] [review]
fix WCAP getItem()

>                 listener.onOperationComplete(
>                     this_.superCalendar, getResultCode(err),
>                     calIOperationListener.GET,
>-          , err ? err : item);
>+                    item &&,
lesson for me please: Doesn't this one either pass over string "false" or I'd rather would want to use the ternary operator for that.

To me the patch doesn't look like doing harm, and if it fixes the problem... r=dbo from me
Comment on attachment 307572 [details] [diff] [review]
fix WCAP getItem()

If it works for Daniel, it works for me. r=ctalbert
Attachment #307572 - Flags: review?(ctalbert) → review+
Duplicate of this bug: 421909
a && b passes either b or false, correct. I though it would not be so bad since the parameter is not used when an error happens, but I changed it to a ternary operator before checking in for you :-)

Checked in on HEAD and MOZILLA_1_8_BRANCH and SUNBIRD_0_8_BRANCH

Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
Checked with nightly build 2008031219 -> task is fixed and verified.
I'm seeing this bug as well i believe.  Here is the output from my error console.

Error: [Exception... "'Component not initialized' when calling method: [calIItipItem::getItemList]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: chrome://lightning/content/imip-bar.js :: isUpdateMsg :: line 437"  data: no]
Source File: chrome://lightning/content/imip-bar.js
Line: 437
I just noticed the nightly build was supposed to have a fix for this.  I went ahead and installed it (after uninstalling 0.8 rc1) and I still see the error I posted in comment 24.  The accept and decline buttons still do not appear.
@Carnell: I can't reproduce your issue and I never get an output in my error console. Please give further information.

- what kind of calendars do you use?
- what do you do when the error output gets visible?
- which application is used to create the invitation? 

Maybe the buttons aren't visible, because the event is already added to your calendar?
Component: Lightning Only → E-mail based Scheduling (iTIP/iMIP)
QA Contact: lightning → email-scheduling
You need to log in before you can comment on or make changes to this bug.