• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-CalendarEXT2 - Calendar Read Failing When Time Value Is Missing from ics file

Scheduled Pinned Locked Moved Solved Troubleshooting
28 Posts 3 Posters 9.7k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    edd189 @sdetweil
    last edited by Jun 10, 2023, 9:18 PM

    @sdetweil Looks like the ics.js branch being used by CX2 had a report on this issue around a year ago with no fix. :(

    https://github.com/kewisch/ical.js/issues/515

    S 1 Reply Last reply Jun 10, 2023, 9:22 PM Reply Quote 0
    • S Offline
      sdetweil @edd189
      last edited by Jun 10, 2023, 9:22 PM

      @edd189 yep, stuff gets old, people get tired, or move on… or it becomes too much work to keep it up to date

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      E 1 Reply Last reply Jun 10, 2023, 9:36 PM Reply Quote 0
      • E Offline
        edd189 @sdetweil
        last edited by edd189 Jun 10, 2023, 9:55 PM Jun 10, 2023, 9:36 PM

        @sdetweil

        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).

        S 1 Reply Last reply Jun 10, 2023, 9:40 PM Reply Quote 0
        • S Offline
          sdetweil @edd189
          last edited by sdetweil Jun 10, 2023, 9:57 PM Jun 10, 2023, 9:40 PM

          @edd189 you could

          console.log("aValue='"+aValue+"'")
          

          to check its contents (in the mm startup output)

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          E 1 Reply Last reply Jun 10, 2023, 9:53 PM Reply Quote 0
          • E Offline
            edd189 @sdetweil
            last edited by Jun 10, 2023, 9:53 PM

            @sdetweil

            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?

            S 1 Reply Last reply Jun 10, 2023, 9:56 PM Reply Quote 0
            • S Offline
              sdetweil @edd189
              last edited by sdetweil Jun 10, 2023, 9:58 PM Jun 10, 2023, 9:56 PM

              @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

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              E 2 Replies Last reply Jun 10, 2023, 9:58 PM Reply Quote 0
              • E Offline
                edd189 @sdetweil
                last edited by Jun 10, 2023, 9:58 PM

                @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.

                1 Reply Last reply Reply Quote 0
                • E Offline
                  edd189 @sdetweil
                  last edited by Jun 10, 2023, 10:01 PM

                  @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 );
                  }
                  };

                  S 1 Reply Last reply Jun 10, 2023, 10:04 PM Reply Quote 0
                  • S Offline
                    sdetweil @edd189
                    last edited by Jun 10, 2023, 10:04 PM

                    @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 …

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    E 2 Replies Last reply Jun 10, 2023, 10:49 PM Reply Quote 0
                    • E Offline
                      edd189 @sdetweil
                      last edited by Jun 10, 2023, 10:49 PM

                      @sdetweil

                      Thanks for your help. Not sure I’m finding the right place where the call is made to fromDateTimeString. I found a few more instances in a file under the build directory. I was previously only looking under the lib directory.

                      Not sure how I missed it, but I need to take a break for the evening. Pick it back up later.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        13/28
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy