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

Newsfeed not displaying on MM

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 2.4k Views 1 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.
  • R Offline
    redkittens
    last edited by redkittens May 30, 2019, 9:32 AM May 29, 2019, 11:07 AM

    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
    • B Offline
      bhepler Module Developer
      last edited by bhepler May 29, 2019, 2:22 PM May 29, 2019, 2:21 PM

      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 May 29, 2019, 2:32 PM Reply Quote 0
      • R Offline
        redkittens @bhepler
        last edited by May 29, 2019, 2:32 PM

        @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

        B 1 Reply Last reply May 29, 2019, 2:49 PM Reply Quote 0
        • B Offline
          bhepler Module Developer @redkittens
          last edited by May 29, 2019, 2:49 PM

          @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 May 29, 2019, 3:24 PM Reply Quote 0
          • R Offline
            redkittens @bhepler
            last edited by redkittens May 30, 2019, 9:33 AM May 29, 2019, 3:24 PM

            @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

            B 1 Reply Last reply May 31, 2019, 2:56 AM Reply Quote 0
            • B Offline
              bhepler Module Developer @redkittens
              last edited by May 31, 2019, 2:56 AM

              @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
              1 / 1
              • First post
                2/6
                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