No events shown in Multiweek view [TypeError: dayStart.clone is not a function]

RESOLVED FIXED in 5.3

Status

Calendar
Calendar Views
--
major
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: ssitter, Assigned: ssitter)

Tracking

({regression})

Lightning 5.3
regression

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Upgraded to Thunderbird 51.0a2 (20160920004004) with Lightning 5.3a2 today. 

Events are shown in today pane but the calendar tab view remains empty and all buttons in the calendar tab toolbar are disabled.

Error console shows:

> TypeError: dayStart.clone is not a function[Learn More]  calendar-views.xml:191:28
> 	goToDay chrome://calendar/content/calendar-views.xml:191:28
> 	switchToView chrome://calendar/content/calendar-views.js:258:5
> 	switchCalendarView chrome://lightning/content/messenger-overlay-sidebar.js:591:5
> 	commonInitCalendar chrome://calendar/content/calendar-chrome-startup.js:22:5
> 	ltnOnLoad chrome://lightning/content/messenger-overlay-sidebar.js:373:5

> TypeError: dayStart.clone is not a function[Learn More] calendar-views.xml:191:28
> 	goToDay chrome://calendar/content/calendar-views.xml:191:28
> 	switchToView chrome://calendar/content/calendar-views.js:258:5
> 	ltnSwitch2Calendar chrome://lightning/content/messenger-overlay-sidebar.js:745:9
> 	calendarTabType.modes.calendar.showTab chrome://lightning/content/messenger-overlay-sidebar.js:60:17
> 	updateCurrentTab chrome://messenger/content/tabmail.xml:1157:15
> 	onxblselect chrome://messenger/content/tabmail.xml:2064:11
> 	set_selectedIndex chrome://global/content/bindings/tabbox.xml:406:15
> 	set_selectedItem chrome://global/content/bindings/tabbox.xml:431:34
> 	_selectNewTab chrome://global/content/bindings/tabbox.xml:476:11
> 	onxblmousedown chrome://global/content/bindings/tabbox.xml:782:11
(Assignee)

Comment 1

2 years ago
When using a new profile the error is only reported in multiweek view but it is possible to switch to another view. In my existing profile it is not possible to switch to another view.
Summary: No events shown in calendar views [TypeError: dayStart.clone is not a function] → No events shown in Multiweek view [TypeError: dayStart.clone is not a function]
(Assignee)

Comment 2

2 years ago
Regression from Bug 1280898

> let d1 = getWeekInfoService().getStartOfWeek(aDate);
> d1.day -= (7 * Preferences.get("calendar.previousweeks.inview", 0));

was changed to 

> let dayStart = cal.getWeekInfoService().getStartOfWeek(aDate);
> dayStart -= 7 * Preferences.get("calendar.previousweeks.inview", 0);

but should be dayStart.day -= ... Same for d2.day +=... vs. dayEnd +=...
(Assignee)

Updated

2 years ago
Blocks: 1280898
(Assignee)

Updated

2 years ago
Keywords: regression
Created attachment 8793027 [details]
Fix - v1

Since this is basically your patch I'm going take this as a review. I've tested and it works as expected.
Attachment #8793027 - Flags: review+
https://hg.mozilla.org/comm-central/rev/255f1b27939e
Assignee: nobody → ssitter
Target Milestone: --- → 5.4
Comment on attachment 8793027 [details]
Fix - v1

a+ for aurora, I guess it wasn't the best idea to do eslint checkins right before the merge :)
Attachment #8793027 - Flags: approval-calendar-aurora+
aurora is closed for merge failures, will have to postpone aurora checkin.
Keywords: checkin-needed

Comment 7

2 years ago
https://hg.mozilla.org/releases/comm-aurora/rev/158ba2f89342

Merge failures, which merge failures? C-A will look pretty green with this push, I reckon ;-)
Keywords: checkin-needed
Target Milestone: 5.4 → 5.3

Comment 8

2 years ago
Resolving this fixed, however there still seems to be at least one other issue. On today's Daily, in multiweeks view only recurring events are displayed, no single events and unfortunately no messages in the console - maybe already reported in bug 1304251, so let's track that there.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED

Comment 9

2 years ago
Please ignore the last comment, I've found my events.
You need to log in before you can comment on or make changes to this bug.