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-CalendarExt3Agenda - Event Transforming not working - Mirror 2.35.0

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    5 Posts 2 Posters 29 Views 2 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.
    • BKeyportB Offline
      BKeyport Module Developer
      last edited by

      I’m having a problem with event transforming not working anymore in Mirror 2.35.0

      the client title (Client’s name) is shown instead of the ev.title I want (Client)

      Nothing is in the logs - help!

      Here’s the code:

      	{
      	  		module: "MMM-CalendarExt3Agenda",
        			position: "bottom_center",
        			classes: "page1",
        			config: {
        				eventTransformer: (ev) => {
      					if (ev.title.search("🏠 Personal Commitment") > -1) {
      						ev.title = ev.title.replace("🏠 Personal Commitment","Personal Commitment")
      					}
      					if(ev.description && ev.description.search("YCBM") > -1) {
             					 	ev.title = "Client"
       					} 
      					return ev
      				},
      				showMiniMonthCalendar: false,
      				//onlyEventDays: 1, 
      				waitFetch: 5000, 
      				refreshInterval: 10000,
      				animationSpeed: 0,
      				calendarSet: ["Main", "Lemay", "Holidays"],
      			}
      		},
      

      db695cef-375c-4567-b335-355560f0c164-image.jpeg

      The "E" in "Javascript" stands for "Easy"

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @BKeyport
        last edited by

        @BKeyport can you use console.log to log the description. See it in the dev window console

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @sdetweil
          last edited by

          There is a big rewrite of calendar this release . To fix the dates, dst/std, and timezone conversions. @kristjanesperanto did a great job. Also fixing node-iCal

          Both also get rid of moment

          I didn’t see any issues in testing, but I didn’t have any transforms

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          BKeyportB 1 Reply Last reply Reply Quote 1
          • BKeyportB Offline
            BKeyport Module Developer @sdetweil
            last edited by

            @sdetweil As I said, I cannot find any errors in any logs I know how to access. (Other than the usual updating DOM without display, etc).

            As for the re-writes, I don’t know enough about it, and in the middle of tax season, so I don’t have time to learn.

            The "E" in "Javascript" stands for "Easy"

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @BKeyport
              last edited by

              @BKeyport NO… I was asking you to add a

              console.log(“ev description-.”+ev.description+“<-”)

              to your tranformer

              then you can see the contents of the description field…

              as this runs in the browser, you would have to open the developers window, console tab, and put ext3, in the filter field to see the messages

              then you would know exactly what is there. and it may give indication of the problem

              you could also dump the fields
              console.log(“ev fields=”,ev)
              note the comma here, it will haveJS to do the unpacking of the fields in ev

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                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