The default bug view has changed. See this FAQ.

PUBLISH does not allow update (SEQUENCE)

RESOLVED FIXED in 1.8

Status

Calendar
E-mail based Scheduling (iTIP/iMIP)
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: klaus, Assigned: klaus)

Tracking

Lightning 1.6

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)

Steps to reproduce:

update an event already added to calendar using PUBLISH
(by using SEQUENCE=xx)

if METHOD=REQUEST in same itip email, this works.


Actual results:

IMIP bar has no buttons.

error console reports error in line 840

looking at code, it seems to recognise that update is requested, but cannot clone item in function function updateItem(item, itipItemItem) {

->lookup of UID went wrong (my speculation about it)

Klaus


see below

first error:
Zeitstempel: 16.07.2012 11:24:01
Fehler: [Exception... "'[JavaScript Error: "item is undefined" {file: "resource://calendar/modules/calItipUtils.jsm" line: 840}]' when calling method: [calIOperationListener::onOperationComplete]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: file:///C:/Users/kbuecher/AppData/Roaming/Thunderbird/Profiles/oq7e67ge.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calCompositeCalendar.js :: <TOP_LEVEL> :: line 566"  data: yes]

following errors:

Zeitstempel: 16.07.2012 11:24:01
Fehler: item is undefined
Quelldatei: resource://calendar/modules/calItipUtils.jsm
Zeile: 840


Expected results:

display an update button in imip bar
(Assignee)

Updated

5 years ago
Component: General → E-mail based Scheduling (iTIP/iMIP)
OS: All → Windows 7
Hardware: All → x86
(Assignee)

Comment 1

5 years ago
FIX for this bug:

calItipUtils.jsm, in function onOperationComplete:

in the following block, replace newItem by item in the call of updateItem by item

wrong call: let newItem = updateItem(newItem, itipItemItem);
correct call: let newItem = updateItem(item, itipItemItem);

it is obvious that the first cannot work.

(compare also the REQUEST further down block with identical call of updateItem)

commented line: original, uncommented line: this solves the bug, update can be added to calendar.

                                case "PUBLISH":
                                    cal.ASSERT(itipItemItem.getAttendees({}).length == 0,
                                               "invalid number of attendees in PUBLISH!");
                                    if (item.calendar.getProperty("itip.disableRevisionChecks") ||
                                        cal.itip.compare(itipItemItem, item) > 0) {
                                        let newItem = updateItem(item, itipItemItem);
//                                        let newItem = updateItem(newItem, itipItemItem);
                                        let action = function(opListener) {
                                            return newItem.calendar.modifyItem(newItem, item, opListener);
                                        };
                                        actionMethod = method + ":UPDATE";
                                        operations.push(action);
                                    }
                                    break;


all tested in lightning 1.4
Klaus
(Assignee)

Comment 2

5 years ago
Created attachment 642680 [details]
FIX allows to update an already received PUBLISHed event for 1.4
(Assignee)

Comment 3

5 years ago
Created attachment 645263 [details] [diff] [review]
allow to add PUBLISHed events to calendar, replace typo (newItem= updateItem(newItem..) by newItem= updateItem(item...))

FIX for 1.6: 
In 
ItipFindItemListener.prototype = {
 
    onOperationComplete:

in 
case "PUBLISH":

replace 
let newItem=updateItem(newItem... 
(this call is circular and cannot work)

by 
let newItem=updateItem(item...

this is then identical to case: "REQUEST" and allows to add PUBLISHed events to a calendar

Klaus
Attachment #645263 - Flags: review?(dbo.moz)
(Assignee)

Comment 4

5 years ago
same problem and fix for LT 1.6
Version: Lightning 1.4 → Lightning 1.6

Comment 5

5 years ago
Created attachment 649084 [details] [diff] [review]
allow to add PUBLISHed events to calendar, replace typo (newItem= updateItem(newItem..) by newItem= updateItem(item...))

Hello klaus, thank you for reporting the problem and its investigation. I took the liberty to convert your proposed fix into a proper patch and request review from the correct calendar peer for you.
Attachment #642680 - Attachment is obsolete: true
Attachment #645263 - Attachment is obsolete: true
Attachment #645263 - Flags: review?(dbo.moz)
Attachment #649084 - Flags: review?(philipp)

Updated

5 years ago
Assignee: nobody → buecher
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86 → All

Comment 6

5 years ago
Philipp, do you think we can take this obvious bug fix for 1.9 and even perhaps 1.8?
Comment on attachment 649084 [details] [diff] [review]
allow to add PUBLISHed events to calendar, replace typo (newItem= updateItem(newItem..) by newItem= updateItem(item...))

I think we can take this for 1.8, lets do it. Thanks for the patch!
Attachment #649084 - Flags: review?(philipp)
Attachment #649084 - Flags: review+
Attachment #649084 - Flags: approval-calendar-beta+
Attachment #649084 - Flags: approval-calendar-aurora+
Pushed to comm-central changeset 85acb9d2e738
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0
Backported to releases/comm-aurora changeset 5bb30d69b276
Target Milestone: 2.0 → 1.9
Backported to releases/comm-beta changeset fa9f0f558147
Target Milestone: 1.9 → 1.8
You need to log in before you can comment on or make changes to this bug.