Read the statement by Michael Teeuw here.
2.32.0 Calendar module limitDays and excludedEvents stopped working
-
@AndyHazz Unfortunately, I don’t know if I can help any further here. The error message (
[ERROR] table not found in HTML.
) is indeed from MMM-Scrapey - I have created a pull request for the module to improve logging, at least in the future. -
Thanks, I’ve merged that logging improvement to MMM-Scrapey.
I suppose my query is simply whether anybody else can see the same calendar functionality issues as me?
- limitDays has changed to limit the number of calendar items, not the number of days worth of calendar items
- excludedEvents appears to do nothing any more, events matching excluded words have started showing when prior to 2.32.0 they were hidden
If it’s only affecting me, I’ll probably try rebuilding my setup from scratch.
-
@AndyHazz what release were you on prior to the upgrade?
I don’t see any code change from 2.31
| correction, there is a test of date after change here. -
@AndyHazz can you show your calendar config, xxx out the URLs.
-
@AndyHazz I should note that this property is NOT a sequential limit of days from today
it is UNIQUE days INCLUDING today
limitDays:2
so if there no events til next Thursday, that is the 1st day
and no events til the following Tuesday, that is the second daywhich is different than event tomorrow and saturday, but only show tomorrow… (2 consecutive days gets today and tomorrow), or two days from NOW gets today/thurs/friday, but still not saturday.
-
@sdetweil yeah that’s what I was using limitDays for and it was working great for my needs until now - I have my kids school lessons synced to a google calendar, and setting limitDays to 1 used to show the full set of lessons for the day. When they get home from school (all events from the current day are in the past), it automatically showed all of the lessons for the following day. Best thing I’ve ever used MM for! Even highlights PE lessons so they know when to bring kit :)
For me now, limitDays: 1 just shows the single next event even when there are 6 more events on that day (and if that event is ‘Tutor time’, it displays when it should be hidden).
I can’t say exactly what version I was on prior to the update but it should have been whatever the previous version was - since I set this up with watchtower in docker I’ve not had to do any manual upgrades.
Here’s my anonamised calendar config - I have 5 different calendar modules running if that’s likely to be a factor, but this is one that has the config issues:
{ module: 'calendar', header: 'School day', position: 'bottom_right', config: { coloredSymbol: true, coloredText: true, showLocation: true, displaySymbol: false, hideTime: true, tableClass: 'medium', flipDateHeaderTitle: true, fade: false, timeFormat: 'absolute', dateFormat: 'ddd', fullDayEventDateFormat: 'ddd', urgency: '0', sliceMultiDayEvents: true, nextDaysRelative: false, limitDays: 1, fetchInterval: '600000', displayRepeatingCountTitle: true, wrapEvents: false, //maxTitleLength: 30, customEvents: [{ keyword: 'Physical Education', symbol: 'volleyball', color: 'Gold' }], excludedEvents: [ 'Tutor time' ], calendars: [ { symbol: 'graduation-cap', url: 'https://calendar.google.com/calendar/ical/REDACTED/basic.ics' } ] } },
-
@AndyHazz Do you mind sharing your ICS, anonymized off course.
-
@AndyHazz found it…
comparing date AND TIME oops…
edit modules/default/calendar/calendar.js
approx line 708
change the lines marked below with //if (this.config.limitDays > 0) { let newEvents = []; let lastDate = today.clone().subtract(1, "days").startOf('day'); // add .startOf('day'), note dot let days = 0; for (const ev of events) { let eventDate = this.timestampToMoment(ev.startDate).startOf('day'); // add .startOf('day'), note dot
-
@sdetweil nice! Yes that’s fixed the limitDays issue for me …
Now, how about part 2 of my issue, the excludedEvents config? The first event showing for me is titled ‘Tutor time’ despite that string being excluded. I’ve tried other terms with/without spaces and nothing seems to work to exclude events any more?
-
@AndyHazz working on it