RSS item link not outputting #1

Closed
daneuman opened this Issue Sep 13, 2011 · 6 comments

Comments

Projects
None yet
3 participants

Using the following code, I am not getting the link elements outputted in the RSS xml. I have confirmed that all of the object variables have data in them. Let me know what needs to be changed to output the link for items.

if(format=='rss'){
var feed = new rss({
title: 'Local Headlines for ' + mkt.name,
feed_url: 'http://www.newsqast.net/news/' + mkt.id + '.rss',
site_url: 'http://www.newsqast.net',
image_url: 'http://www.newsqast.net/images/nqicon.png',
author: 'NewsQast'
});
for (var m = 0; m < mkt.items.length; m++) {
feed.items.push({
title: mkt.items[m].channel.item.title,
description: mkt.items[m].channel.item.description,
url: mkt.items[m].channel.item.link,
date: mkt.items[m].channel.item.pubDate
});
}
res.send(feed.xml());
}

I changed the following two lines from item.link to item.url in the test parameter and it fixed the issue.

ifTruePush(item.link, item_values, { link: item.url });
ifTruePush(item.link || item.guid || item.title, item_values, { guid: [ { _attr: { isPermaLink: !item.guid && !!item.url } }, item.guid || item.url || item.title ] });

Owner

dylang commented Sep 13, 2011

Thanks for finding that issue. I'm currently on vacation but I want to help so I'll try to find some time to fix this for you and push an update.

Thanks for the help!

Any update on this?

On Tue, Sep 13, 2011 at 11:59 AM, Dylan Greene <
reply@reply.github.com>wrote:

Thanks for finding that issue. I'm currently on vacation but I want to
help so I'll try to find some time to fix this for you and push an update.

Reply to this email directly or view it on GitHub:
#1 (comment)

Contributor

xdamman commented Sep 28, 2011

Having the same issue. Any update?

dylang closed this in 3803adb Oct 5, 2011

dylang closed this in 6d8cf7d Oct 5, 2011

Owner

dylang commented Oct 5, 2011

Sorry for taking so long on this. Thanks to xdamman for creating the fix. Update is now on npm.

@dylang dylang pushed a commit that referenced this issue Jan 28, 2014

@evantill evantill Merge pull request #1 from Mithgol/patch-2
+2 “dylan” → “dylang”
987332c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment