Read the statement by Michael Teeuw here.
MMM-CalendarEXT2 - Calendar Read Failing When Time Value Is Missing from ics file
-
@edd189 if the time is not specified, the event is a full day event.
spec hasn’t changed, but the ics providers have changed their data, outside the spec.
MS in particular has started using the custom timezone feature, and mapping all the events to their custom(overlapping with IANA based standard timezones)
all this breaks a bunch of stuff…
only the calendar modules use the ics parser. ext2 had its own. MM default uses node-ical
-
@sdetweil Looks like the ics.js branch being used by CX2 had a report on this issue around a year ago with no fix. :(
-
@edd189 yep, stuff gets old, people get tired, or move on… or it becomes too much work to keep it up to date
-
from line 1142:
ICAL.Time.fromString = function fromString(aValue) {
if (aValue.length > 10) {
return ICAL.Time.fromDateTimeString(aValue);
} else {
return ICAL.Time.fromDateString(aValue);
}
};Looks like time.js within (https://github.com/kewisch/ical.js) is already trying to do something different with the entry if the length is less than 10. But that count seems off to me – it should never make the call to line 1107 (fromDateTimeString) at all. It should be using line 1083 (fromDateString).
-
@edd189 you could
console.log("aValue='"+aValue+"'")
to check its contents (in the mm startup output)
-
I tried to put
console.log(‘[CALEXT2] calendar: >> error on line 1111’);
within the time.js file, found embedded within the CX2 directory. It didn’t output anything. Will a sub-rountine embedded a few layers down still output to the console? Do I need to reinstall or re-link anything?
-
@edd189 generally yes, regardless of where it is…
no, no need to do any compile
sory, forgo this darned forum changes quotes not in a code block …
make sure they are the straight up and down ones
look back at my example -
@sdetweil Doh, the error reporter already shows me the aValue.
aValue = 2022-01-01T::
By my count, that is 13 characters. Let me see if simply changing 10 to 13 in the above code fixes it.
-
@sdetweil Is this right?
ICAL.Time.fromString = function fromString(aValue) {
if (aValue.length > 10) {
return ICAL.Time.fromDateTimeString(aValue);
Log.log([CALEXT2] calendar: >> greater 10
);
Console.log($avalue.length );
} else {
return ICAL.Time.fromDateString(aValue);
Log.log([CALEXT2] calendar: >> less 10
);
Console.log($avalue.length );
}
}; -
@edd189 said in MMM-CalendarEXT2 - Calendar Read Failing When Time Value Is Missing from ics file:
Log.log([CALEXT2] calendar: >> greater 10);
Console.log($avalue.length );no… those new statements are after the return… so will never be executed
Log.log and console.log are the same here …