Closed Bug 1448717 Opened 2 years ago Closed Last year

caldav calendars fail with xmlHeader not defined error


(Calendar :: General, defect)

Lightning 6.3
Not set


(Not tracked)



(Reporter: ch-moz2, Assigned: Fallen)


(Blocks 1 open bug)



(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180322223039

Steps to reproduce:

Set up a CalDAV calendar, attempt to read the calendar items.

Actual results:

no calendar entries load. The developer toolbox console says that "xmlHeader" is not defined.

ReferenceError: xmlHeader is not defined[Learn More]
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "xmlHeader is not defined" {file: "resource://calendar/modules/calUtils.jsm -> file:///usr/local/lib/thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calDavRequestHandlers.js" line: 331}]'[JavaScript Error: "xmlHeader is not defined" {file: "resource://calendar/modules/calUtils.jsm -> file:///usr/local/lib/thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calDavRequestHandlers.js" line: 331}]' when calling method: [calIOperationListener::onOperationComplete]

Expected results:

Calendar events should have loaded.
There seems to have been a change in dealing with the scope in loaded subscripts - up to now the code has been falling back to the loading script if an undefined var occured. We could easily add a definition for xmlHeader (and MIME_TEXT_XML as well) to calDavRequestHandler or move all the definitions from calDavCalendar there, but probably we should have a look at the loading mechanism, since this may have further yet uncovered impact. Philipp, what do you think?
Ever confirmed: true
Flags: needinfo?(philipp)
Attached patch Wip caldav refactoring (obsolete) β€” β€” Splinter Review
Not that I have cleaned this up, but I did some refactoring that I will need for the autodiscovery patch, and that should fix the xml header thing.
Flags: needinfo?(philipp)
Blocks: 1480039
Philipp, what do we do with this with regard to TB63? Your patch is a complete refactoring and still WIP. Would it make sense to implement a resolution just for this issue in the first place and do the rest in a follow-up bug?
Flags: needinfo?(philipp)
Yes, we can do that. The patch above is pretty elaborate and hence has its own regression risks.
Flags: needinfo?(philipp)
Attached patch Fix - v1 β€” β€” Splinter Review
Assignee: nobody → philipp
Attachment #8964205 - Attachment is obsolete: true
Attachment #9025329 - Flags: review?(makemyday)
Attachment #9025329 - Flags: approval-calendar-beta+
Comment on attachment 9025329 [details] [diff] [review]
Fix - v1

Review of attachment 9025329 [details] [diff] [review]:

Thanks, looks good.
Attachment #9025329 - Flags: review?(makemyday) → review+
Keywords: checkin-needed
Pushed by
Define missing caldav variables after loader changes. r=MakeMyDay
Closed: Last year
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.7
Beta (TB 64 / Cal 6.6 beta 3):
Target Milestone: 6.7 → 6.6
You need to log in before you can comment on or make changes to this bug.