The blog items links are the same
claudiu.cristea - April 20, 2007 - 09:07
| Project: | Drupal |
| Version: | 5.1 |
| Component: | aggregator.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Description
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.

#1
Here is the attachement...
#2
I can confirm this bug on a vanilla installation.
I am working on a patch right now.
#3
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):
<?phpif ($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
Dupe of #130344: Headline links do not get parsed in some ATOM feeds.