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

claudiu.cristea - April 20, 2007 - 09:11

Here is the attachement...

AttachmentSize
screenshot_18.jpg 146.37 KB

#2

flevour - July 9, 2007 - 14:36
Assigned to:Anonymous» flevour

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

#3

flevour - July 9, 2007 - 14:49
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

flevour - July 9, 2007 - 14:59

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

#5

flevour - July 9, 2007 - 15:48

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

mustafau - August 16, 2008 - 19:18
 
 

Drupal is a registered trademark of Dries Buytaert.