Dear Friends,

I am using Drupal 6.2 + PostgreSQL 8.3 + Php 5 under Linux.
Aggregation is version 6.2. Am I posting in the right place ?

I aggregate 30 rss streams.

It appears that some streams have incorrect content.
For example, time may be NULL or zero.

If such a news is included in database, it results in a blank summary (in block).
The news block is blanck, but the link and the detailed page works fine.

This seems to be a bug in the line of aggregator.module

I replaced :
$result = db_query_range('SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = %d ORDER BY i.timestamp DESC, i.iid DESC', $category->cid, 0, $category->block);

which may produce NULL results if for some reasons date or content is zero.

with :

$result = db_query_range('SELECT i.* FROM {aggregator_category_item} ci INNER JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = %d ORDER BY i.timestamp DESC, i.iid DESC', $category->cid, 0, $category->block);

and now news display very well.

Comments

Ashraf Amayreh’s picture

Project: Aggregation » Drupal core
Version: 5.x-4.4 » 6.2
Component: Code » aggregator.module

Moving it...

gábor hojtsy’s picture

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

Critical issues are those breaking Drupal - when Drupal does not work. This is just some items not showing correctly, which is not critical.

Also, you seem to have changed LEFT JOIN to INNER JOIN to 'solve' the problem, which basically skips the broken items as far as I understand, so it is not really solving the broken items, but just stepping them over. Does not seem like a great idea to me. Looks like you have category entries for non-existent items, which seems like a broken data set to me. The code which creates such broken data should be fixed IMHO.

Anonymous’s picture

Status: Needs work » Closed (works as designed)