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.

    Title on items in default news feed module don't work for BBC - Bug or design?

    Scheduled Pinned Locked Moved Bug Hunt
    1 Posts 1 Posters 813 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.
    • P Offline
      Pauliolio
      last edited by

      It’s always bugged me that instead of the actual title of a news item being displayed by the default newsfeed module, every item is preceded by the text in the ‘title’ field of the feed’s config in the newsfeed module’s section of the config.js file.

      To try and explain that, the feeds section of my config.js file is:

      			config: {
      				feeds: [
      					{
      						title: "BBC UK",
      						url: "http://feeds.bbci.co.uk/news/uk/rss.xml"
      					},
      
      					{
      						title: "BBC World",
      						url: "http://feeds.bbci.co.uk/news/world/rss.xml",
      					},
      				],
      				showSourceTitle: true,
      				showPublishDate: false,
      				showDescription: true
      			}
      
      

      And the ‘Title’ shown on the mirror for every news item that comes from “http://feeds.bbci.co.uk/news/uk/rss.xml” is “BBC UK”, instead of the actual title of the item.

      I looked in the newsfeed.js file and there’s a line that says:

      if (this.config.showSourceTitle && this.newsItems[this.activeItem].sourceTitle !== '') sourceAndTimestamp.innerHTML = this.newsItems[this.activeItem].sourceTitle
      
      

      I then loaded the feed in Chrome & had a look at the xml source.
      In there the name of the title ‘field’ is “title”.
      I went to that line in the newsfeed.js file, changed .sourceTitle to title, rebooted the mirror and, yes!
      Each item in the feed has its proper title.

      So, my question is - Is this an issue specific to the BBC newsfeeds, or is it a more general ‘bug’ in the newsfeed module please?

      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 Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy