Closed Bug 686273 Opened 13 years ago Closed 13 years ago

WCAP subscribed calendars not appearing

Categories

(Calendar :: Provider: WCAP, defect)

Lightning 1.0b7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: luc.roettgers, Assigned: ssitter)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1 Steps to reproduce: I tried to setup my WCAP Calendar at work. Actual results: Configuration of a WCAP Calendar works but no subscribed ones appeared. Expected results: A List of several subscribed calendars (owned and non owned) should have appeared.
Please enable logging and check your error console for messages or errors. I believe the prefs are mentioned in the other bug you just commented on.
Attached file Error Log β€”
Comment on attachment 559848 [details] Error Log error: cal.getCalendarManager is not a function stack: 1: [.../calWcapUtils.js:169] logError 2: [.../calWcapSession.js:685] search_onResult 3: [.../calWcapSession.js:923] searchForCalendars_resp 4: [.../calWcapRequest.js:181] calWcapRequest_execRespFunc 5: [.../calWcapSession.js:983] searchForCalendars_netResp 6: [.../calWcapRequest.js:194] calWcapRequest_execSubRespFunc 7: [.../calWcapSession.js:778] issueNetworkRequest_resp 8: [.../calWcapRequest.js:194] calWcapRequest_execSubRespFunc 9: [.../calWcapSession.js:804] netResp 10: [.../calWcapRequest.js:420] calWcapNetworkRequest_execRespFunc
Attachment #559848 - Attachment mime type: application/octet-stream → text/plain
There are some local variables and function arguments called "cal". Most probably they eclipse the namespace "cal" that contains the function getCalendarManager. Possible error locations: https://mxr.mozilla.org/comm-central/search?string=+cal+&case=on&find=%2Fcalendar%2F&findi=&filter=%5E%5B%5E%5C0%5D*%24&hitlimit=&tree=comm-central
Status: UNCONFIRMED → NEW
Ever confirmed: true
Seeing this, too. Happens for each subscribed calendar after logging 'registering subscribed calendar' It seems to break in calWcapSession.js line 570, without 'cal.' it works for me. https://mxr.mozilla.org/comm-central/source/calendar/providers/wcap/calWcapSession.js#570
Ah yes, in that function the argument "cal" shadows the namespace "cal". Changing the argument name and adapting the code in that function is the correct solution here. If someone wants to put up a quick patch I'll r+ it here.
This patch renames local variables and function arguments from "cal" to "calendar" or "aCalendar" to avoid collision with "cal" namespace. I could not test the patch thoroughly. Therefore I'd appreciate if someone could do some testing with the patch applied.
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #559877 - Flags: review?(philipp)
Comment on attachment 559877 [details] [diff] [review] don't use "cal" name for variables or function arguments Review of attachment 559877 [details] [diff] [review]: ----------------------------------------------------------------- Oooh great! Thanks for the patch, very nice. r=philipp and approval down to comm-beta as is but you could change: ::: calendar/base/content/calendar-common-sets.js @@ +574,5 @@ > get all_local_calendars_readonly() { > // We might want to speed this part up by keeping track of this in the > // calendar manager. > + var calendars = getCalendarManager().getCalendars({}); > + var count = calendars.length; While you're here, you could change to cal.getCalendarManager and use let instead of var. Same goes for other places where there are not too many var statements in the function.
Attachment #559877 - Flags: review?(philipp) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Summary: WCAP subscribed calendars not apearing → WCAP subscribed calendars not appearing
Target Milestone: --- → Trunk
Luc, Jens could you help to verify that the fix works? New test builds for Thunderbird 7 Beta should be available from https://ftp.mozilla.org/pub/mozilla.org/calendar/lightning/tinderbox-builds/comm-beta/
Just tested the latest build, works fine!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: