Installation:
Drupal 5.1
UserPoints 5.x-1.1
PostgresSQL Database Server 8.23
Scenario:
- Install UserPoints module
- update the database
- make HighestUser visible on the right sidebar
==> No users are displayed as following SQL seems to be executed:
SELECT p.uid, u.name, p.points FROM userpoints p INNER JOIN users u USING (uid) GROUP BY p.uid ORDER BY p.points DESC LIMIT 5 OFFSET 0 in /usr/local/drupal-5.1/includes/database.pgsql.inc on line 144.
This SQL is malformed as it doesn't state any aggregation functions for u.name and p.points.
Please advise.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | userpoints_transaction_tools.module.patch | 568 bytes | jaime_pomales |
Comments
Comment #1
kbahey commentedYou have a point there about no aggregation function.
It works OK in MySQL though.
I don't use PostgreSQL, so someone who does must come up with a tested patch, then I will commit it.
Comment #2
kbahey commentedComment #3
jaime_pomales commentedWill this do? This patch adds u.name and p.points to the aggregate. Just because it works in Mysql doesn't mean it's correct. I'm happy to help fixing all the issues that I have with this module on postgresql. I've got a bunch of custom patches to get it working mostly (I'm still having problems however).
Anyway, this is a super simple fix.
Comment #4
jredding commentedpatch manually tested and applied to cvs tag DRUPAL-5--3 (NOT HEAD).
Comment #5
jredding commentedThis needs some Postgres-user's loving. Can anyone test out 2.14 and v3 on postgres to ensure they are working correctly.
transaction_tools is merged into core (not a contrib module) in v3
Comment #6
jaime_pomales commentedSure, I'll take a look and get back to you.
Comment #7
jredding commentedComment #8
berdirSorry for pinging the participants.
Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.
I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.