Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Newsfeed not displaying on MM

    Troubleshooting
    2
    6
    809
    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.
    • R
      redkittens last edited by redkittens

      The default newsfeed module is not displaying when I run MM, and doesn’t say it is loading. It used to work fine. I’ve since made made various edits and added an additional news source and it’s still not working. This is what it looks like in the config.js file:

                      {
                              module: "newsfeed",
                              position: "bottom_bar",
                              config: {
                                      feeds: [
                                              {
                                                      title: "ABC News",
                                                      url: "http://abc.net.au/news/feed/51120/rss.xml",
                                              },
                                              {
                                                      title: "Huffington Post",
                                                      url: "https://www.feedspot.com/infiniterss.php?q=site:http%3A%2F%2Fwww.huffingtonpost.com.au%2Frss%2Findex.xml",  
                                              },
                                      ],
                                      showSourceTitle: true,
                                      showPublishDate: true,
                              }
                      },
              ]
      
      };
      

      and this is what the default newsfeed module looks like:

      Module.register("newsfeed",{
      
              // Default module config.
              defaults: {
                      feeds:
                              {
                                      title: "ABC News",
                                      url: "http://abc.net.au/news/feed/51120/rss.xml",
                                      encoding: "UTF-8"
                              },
                              {
                                      title: "Huffington Post",
                                      url: "https://www.feedspot.com/infiniterss.php?q=site:http%3A%2F%2Fwww.huffingtonpost.com.au%2Frss%2Findex.xml",
                               },
      
                      ],
                      showSourceTitle: true,
                      showPublishDate: true,
                      showDescription: false,
      
      1 Reply Last reply Reply Quote 0
      • bhepler
        bhepler Project Sponsor last edited by bhepler

        You either did not copy the entire URL for the 2nd feed when posting it to the forum, or you didn’t copy the entire URL when posting to your config.js file. The HuffPo URL in your config is missing the XML extension and closing quotation marks.

        R 1 Reply Last reply Reply Quote 0
        • R
          redkittens @bhepler last edited by

          @bhepler The end of the URL is there, you just have to scroll across due to its length. I wish that was the problem haha

          bhepler 1 Reply Last reply Reply Quote 0
          • bhepler
            bhepler Project Sponsor @redkittens last edited by

            @redkittens The end of the URL is there from the default config.js but it’s not in the 1st one. Scrolling right isn’t making it appear for me.

            The other thing I noticed was that you apparently started copying from your config a couple lines early, but I presume those close brackets are continuations from other module configs.

            The default feeds from the module are there in case you don’t have your own RSS feeds, right? So you can test out the module by deleting the feeds from your configuration. So try it out. Change your config.js entry for the newsfeed module to only read as so:

            {
                 module: "newsfeed",
                 position: "bottom_bar",
            },
            

            You should get two news feeds in the module. If it works, add the config & feed parameters and make sure it still works.

            R 1 Reply Last reply Reply Quote 0
            • R
              redkittens @bhepler last edited by redkittens

              @bhepler Oh my bad, that was a bad copy and paste and I’ve edited it for clarity. I just changed my config.js entry to what you recommended and unfortunately still no display. There must be an error in my newsfeed.js file. Thanks for your suggestion though

              bhepler 1 Reply Last reply Reply Quote 0
              • bhepler
                bhepler Project Sponsor @redkittens last edited by

                @redkittens - In general, you should not be modifying the module javascript files. newsfeed.js, clock.js, etc work pretty well and you just need to modify your config.js to configure the modules correctly.

                For example, you’re trying to modify the newsfeeds that are used by the newsfeed module, yes? Any configuration that you put in the config.js will override the defaults in the newsfeed.js module. You don’t need to overwrite the default values because the Magic Mirror framework will do it for you.

                If you need to add functionality to a module, then it’s a different story. But in my experience about 85% of what users need can be handled with careful editing of the config.js file.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy