Download & Extend

The blog items links are the same

Project:Drupal core
Version:5.1
Component:aggregator.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I use the aggregator module to display items from a blogspot.com site. The source is http://tcd-pntcd.blogspot.com/feeds/posts/default. I'm getting the same link for each items (the oldest link) while the titles are OK.

Attached is a screenshot with the content of aggregator_item table where you can see the same link for each feed items.

Comments

#1

Here is the attachement...

AttachmentSizeStatusTest resultOperations
screenshot_18.jpg146.37 KBIgnored: Check issue status.NoneNone

#2

Assigned to:Anonymous» flevour

I can confirm this bug on a vanilla installation.
I am working on a patch right now.

#3

Assigned to:flevour» Anonymous

I can't fix the bug because I think it requires deeper knowledge of the inner workings of the module itself. What I found out until now is that the bug is caused by the fact the feed doesn't provide a LINK attribute for each post.
Therefore this part (from aggregator.module lines 865/870):

<?php
   
if ($item['LINK']) {
     
$link = $item['LINK'];
    }
    else {
     
$link = $feed['link'];
    }
?>

results on the else-part being executed. Since $feed['link'] never changes, the result is all the aggregated posts being inserted with the same LINK attribute.

#4

I can also confirm the bug for any feed of the type: "$BLOGSPOT-BLOG-URL/feeds/posts/default" (GoogleBlog feed for example).

#5

Sorry for spamming, I can see that "$BLOGSPOT-BLOG-URL/feeds/posts/default" is an alias for "$BLOGSPOT-BLOG-URL/atom.xml".
The feed contains correct information that are not parsed correctly.
The whole XML thing here seems to use some bit of magic (the global $items variable gets populated in a way I am not getting at the moment.

#6