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.

    News feed and calandar hang after translation

    Scheduled Pinned Locked Moved Solved Troubleshooting
    6 Posts 2 Posters 1.7k 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.
    • idoodlerI Offline
      idoodler Module Developer @zipo13
      last edited by

      @zipo13 Hi and welcome to the MagicMirror Forum!

      You can debug it very easily:

      Node.js side error:

      • Execute pm2 log mm
      • This shows you the last 15 lines of the error log, it should give you an idea what may be wrong.

      Browser side error:

      • Open MagicMirror on your local Browser (Chrome is preferred)
      • Open the browsers Debugger, reload the page, it should give you an idea what may be wrong.

      You can post the results here for further analysis.

      1 Reply Last reply Reply Quote 0
      • Z Offline
        zipo13
        last edited by

        I did not use pm2 as I couldn’t get it to work properly in the past.
        This MM install was done manually and not through a script.
        so i have no idea how to get to the server logs.

        I did use Chrome to see errors and I got about 6 of these:

        moment-with-locales.js:3307 Uncaught (in promise) TypeError: Cannot read property 'humanize' of undefined
            at Moment.from (moment-with-locales.js:3307)
            at Moment.fromNow (moment-with-locales.js:3314)
            at Class.getDom (newsfeed.js:115)
            at main.js:110
            at new Promise (<anonymous>)
            at updateDom (main.js:109)
            at Object.updateDom (main.js:514)
            at Class.updateDom (module.js:358)
            at newsfeed.js:312
        16
        
        moment-with-locales.js:3307 Uncaught (in promise) TypeError: Cannot read property 'humanize' of undefined
            at Moment.from (moment-with-locales.js:3307)
            at Moment.fromNow (moment-with-locales.js:3314)
            at Class.getDom (newsfeed.js:115)
            at main.js:110
            at new Promise (<anonymous>)
            at updateDom (main.js:109)
            at Object.updateDom (main.js:514)
            at Class.updateDom (module.js:358)
            at newsfeed.js:312
        

        It seems related since the newsfeed.js and calender.js are mentioned but what is “humanize”?

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zipo13
          last edited by

          @zipo13 said in News feed and calendar hang after translation:

          ‘humanize’ of undefined

          Got it.
          After asking what is “humanize” I thought what not just google it :nerd_face: ?

          So I did and came out with this thread

          They say that the locale is also used to load other stuff and that the locale name must match an existing locale on the system.
          That got me thinking that maybe I used il.js which is the country and not the language.
          So I changed everything to he.js and now it working :grinning_face_with_smiling_eyes:

          idoodlerI 1 Reply Last reply Reply Quote 0
          • idoodlerI Offline
            idoodler Module Developer @zipo13
            last edited by

            @zipo13 Just to clarify, what exact file did you edit?

            Z 1 Reply Last reply Reply Quote 0
            • Z Offline
              zipo13 @idoodler
              last edited by

              @idoodler Originally I translated them by creating a new file called il.js and added it to the translations.js file.

              By debugging and reading the thread mentioned above I understood that something was wrong with the locale.

              It got me thinking that Israel locale is he_IL and that maybe I used the IL instead of the HE.
              That means that the MM uses that locale for other things too.
              I changed the file name to he.js and updated the tranlations.js and that got things to work.

              1 Reply Last reply Reply Quote 1
              • 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