Closed Bug 659958 Opened 13 years ago Closed 13 years ago

Weekly Planner and Monthly Grid print formats are broken [Error: calendarDefaultTimezone is not defined] [Error: ASSERT is not defined]

Categories

(Calendar :: Printing, defect)

x86
Windows 7
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: ssitter)

Details

(Keywords: regression, Whiteboard: [needed beta][no l10n impact][good first bug])

Attachments

(1 file)

Lightning 1.0b4pre (20110526) with Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110526 Thunderbird/3.3a4pre Weekly Planner and Monthly Grid print formats are broken [Error: calendarDefaultTimezone is not defined] [Error: ASSERT is not defined] Steps to reproduce: 1) Switch to calendar tab and select events that you want to print 2) Select menu File > Print 3) In the print preview dialog set the print format to Weekly Planner or Monthly Actual results: Print preview will show only blank. Error Console shows different errors depending on the selected format: Error: ASSERT is not defined Source file: file:///C:/[...]/calendar-js/calWeekPrinter.js Line: 128 Error: calendarDefaultTimezone is not defined Source file: file:///C:/[...]/calendar-js/calMonthGridPrinter.js Line: 303
Thanks for finding this! All we need to do is prefix those functions with cal.
Flags: blocking-calendar1.0+
Whiteboard: [needed beta][no l10n impact][good first bug]
Attached patch patch β€” β€” Splinter Review
Patch restores basic functionality. After fixing the initial errors more errors were reported. An interesting error was "item is not defined" in the for each loop caused by variable redefinition: for each (let item in sortedList) { let sDate = item.startDate... // raised error item is not defined ... let item = <tr>... // because variable with same name is declared later }
Assignee: nobody → ssitter
Status: NEW → ASSIGNED
Attachment #535827 - Flags: review?(philipp)
Comment on attachment 535827 [details] [diff] [review] patch r=philipp with one more change: diff -r fbe3582252ec calendar/import-export/calOutlookCSVImportExport.js --- a/calendar/import-export/calOutlookCSVImportExport.js Sat May 28 00:50:00 2011 +0200 +++ b/calendar/import-export/calOutlookCSVImportExport.js Mon May 30 11:34:03 2011 +0200 @@ -386,7 +386,7 @@ if ("categoriesIndex" in args) { txt = this.parseTextField(eventFields[args.categoriesIndex]) if (txt) { - let categories = categoriesStringToArray(txt); + let categories = cal.categoriesStringToArray(txt); event.setCategories(categories.length, categories); } }
Attachment #535827 - Flags: review?(philipp) → review+
Sorry, I don't see how your review comment is connected to my patch. categoriesStringToArray() is used without cal prefix in all code locations: http://mxr.mozilla.org/comm-central/search?string=categoriesStringToArray&find=/calendar/
You're right, this is not technically connected with printing. I was checking for other functions from calUtils not used with the cal prefix in the import-export folder, since the files here don't load calUtils.js via subscript loader. Feel free to check in without change and I'll whip up a separate patch (comm-central + comm-miramar).
Setting checkin-needed. Seems my checkin rights have been disabled and I need to get them re-activated first.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.0b4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: