Page 1 of 1

Bugfix for RSS Aggregator using SQLite

Posted: Sat May 03, 2008 5:12 pm
by Tscherno
Just installed my first S9Y Installation using SQLite3 as DB. Worked like a charm, till i installed the RSS-Aggregator-Plugin. Everything seems to work; you can add feeds but they do not show up. I checked that the entries are in the db correctly.

I found the problem on the select-side. In line 285 in the serendipity_event_aggregator.php the select is done without explicit table names in the order by clause:

$sql = "SELECT f.feedid, f.feedname, f.feedurl, f.htmlurl, fc.categoryid, f.last_update, f.charset, f.match_expression
FROM {$serendipity['dbPrefix']}aggregator_feeds AS f
LEFT OUTER JOIN {$serendipity['dbPrefix']}aggregator_feedcat AS fc
ON f.feedid = fc.feedid
ORDER BY feedname, feedid
";

That causes SQLite crying around:
SQL error: ambiguous column name: feedid

So i changed the select to this:
$sql = "SELECT f.feedid, f.feedname, f.feedurl, f.htmlurl, fc.categoryid, f.last_update, f.charset, f.match_expression
FROM {$serendipity['dbPrefix']}aggregator_feeds AS f
LEFT OUTER JOIN {$serendipity['dbPrefix']}aggregator_feedcat AS fc
ON f.feedid = fc.feedid
ORDER BY feedname, f.feedid
";

Now everything works fine.

PS: Isn't there a error handling for SQLite errors?

Re: Bugfix for RSS Aggregator using SQLite

Posted: Sun May 04, 2008 9:06 pm
by garvinhicking
Hi!

Many thanks for this bugfix, i just committed that!

Best regards,
Garvin