An error occurs when parsing RSS 2.0 feeds where more than one of the feed items has no description associated with an item. _parser_common_syndication_RSS20_parse() is generating a description when none is available from the feed item title, but not resetting the $body variable resulting in the title of previous feed items being used for the description of subsequent feed items with no description.

This can be fixed by adding $body = ''; at line 358 of feeds/libraries/common_syndication_parser.inc; and the conditional on line 373 needs modifying from !isset($body) to empty($body) in order to generate correct descriptions.

CommentFileSizeAuthor
#2 feeds.common.syndication.parser.patch753 bytesadityakg

Comments

alex_b’s picture

Priority: Normal » Critical
Issue tags: +Novice

Thanks for reporting. This fix is small, we should get it into the next release, hence setting it to critical.

This is a Novice Task.

adityakg’s picture

Status: Active » Needs review
StatusFileSize
new753 bytes

attached the code change as per issue description.

alex_b’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

My apologies - reading the code closer I'm actually not sure what's the exact issue as I do see

$title = $body = $original_author = $original_url = $guid = '';

at the beginning of the foreach() loop which resets $body to '' for every iteration. So I'm having a hard time seeing where the error that was reported in the original issue stems from.

Further:


    if (!isset($body)) {
      $body = "{$news['title']}";
    }

I think we should leave the body empty if there is no description present. No need to populate it with the title. The analogous atom10 parser function doesn't use the title for the description either.

monkeyninja: obviously, I'm missing something here. Care to bring light into this issue?

rickmanelius’s picture

Is this still relevant? It's been 2 years and it hasn't had any other complaints. Plus the line in #3 looks like it takes care of everything. Closed works as designed?

Alienpruts’s picture

Issue summary: View changes
Status: Needs work » Closed (works as designed)

Setting to Closed, Works as Designed