I enabled the pralexa from the 1.4 version but got at the cron run this error msg:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(n.nid) FROM node n LEFT JOIN weblinks w USING(vid, nid) LEFT JOIN webli' at line 1 query: SELECT w.url, n.vid, DISTINCT(n.nid) FROM node n LEFT JOIN weblinks w USING(vid, nid) LEFT JOIN weblinks_pralexa p USING (vid, nid) INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all'))) AND ( n.type='weblinks' AND n.status=1 )ORDER BY p.last_checked ASC LIMIT 0, 20 in /var/www/htdocs/modules/weblinks/contribs/pralexa/pralexa.module on line 97.

When doing a cron run by admin account i got this one:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(n.nid) FROM node n LEFT JOIN weblinks w USING(vid, nid) LEFT JOIN webli' at line 1 query: SELECT w.url, n.vid, DISTINCT(n.nid) FROM node n LEFT JOIN weblinks w USING(vid, nid) LEFT JOIN weblinks_pralexa p USING (vid, nid) WHERE n.type='weblinks' AND n.status=1 ORDER BY p.last_checked ASC LIMIT 0, 20 in /var/www/htdocs/modules/weblinks/contribs/pralexa/pralexa.module on line 97.

any idea?

Comments

nancydru’s picture

Which access control module are you using? It is clear that it has rewritten the query.

Please try going to line 92 of the Pralexa module and change the order of the fields from

  $query = "SELECT w.url, n.vid, n.nid FROM {node} n "

to

  $query = "SELECT n.nid, w.url, n.vid FROM {node} n "

I believe that DISTINCT only works at the beginning of the list.

michtoen’s picture

Status: Active » Fixed

Ah, thx - i try it tomorrow.

i have only http://drupal.org/project/og_user_roles installed as permission changing module.

michtoen’s picture

confirmed, fix works fine.

http://www.daimonin.org/pralexa

thanks!

nancydru’s picture

Hmm, I see something that needs to be back ported - Alexa should be lower.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.