Hi. I'm getting ready to roll 1.5.0 RC3 out (or RC4 or final if they come along) for our support site - great software, thanks for your efforts on it.
I recently noticed a few bugs related to having an article in multiple categories. For example, the top 10 viewed and last 5 posted lists are including the same article multiple times because it's in multiple categories. I think this is just a matter of updating the SQL to only get distinct records, or modifying the while() statement that handles that query to ignore duplicate records.
Thanks for looking at this.
Chris
1.5.0 RC3 - bugs with articles in multiple categories
Moderator: Thorsten
Hi Chris,
I know about this issue and by this time I don't know how to fix it best... what's your opinion? A DISTINCT does not solve this.
bye
Thorsten
I know about this issue and by this time I don't know how to fix it best... what's your opinion? A DISTINCT does not solve this.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Well, here's what I put at the bottom of the while loop in inc/functions.php:generateTopTenData():
But that's sort of a messy hack, in that it still makes you retrieve all of the records from the database, and then leaves the ones you don't want behind. I think the right solution is a SQL re-write, but I think MySQL's lack of support for "IN" subselects and "LIMIT" (at least in the version I'm using) is problematic here. I can take a look at it more later, but the above worked for me for now.
I noted that the problem arises in the RSS feed generation too.
Chris
Code: Select all
if (! $already_included[$row->id]) {
$returnArray[] = $data;
$already_included[$row->id] = 1;
$i++;
}
I noted that the problem arises in the RSS feed generation too.
Chris
Hi,
it have to work in PostgreSQL, Sybase and MS SQL, too. I know about these problems and thinking about a solution for weeks...
bye
Thorsten
it have to work in PostgreSQL, Sybase and MS SQL, too. I know about these problems and thinking about a solution for weeks...
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist