Hi,

the D5 version of the 'Stumble' module seems to have some serious problems; I've installed it recently on five D5 sites, ond it's only working as advertised in one of these sites (the D6 version seems to be more robust).

Behaviour: I added an "View random article" link to my site's menu; it points to http://mysite.tld/stumble. If I click on this link, I'm redirected to the Frontpage (http://mysite.tld/), which happens to be a Panels page, configured to be the site's frontpage at ./admin/settings/site-information (I changed this back to the default ./node which didn't change the module's behaviour).

It doesn't matter if I click on the "random article" link on the frontpage itself, of from some other content page, it always directs to the frontpage.

It also doesn't matter if I'm logged in as user #1 or clicking onthe "random article" link as an anonymous visitor.

Error messages: Watchdog records the following error:

Location: http://www.mysite.tld/stumble
Referrer: http://www.mysite.tld/admin/settings/stumble
Message: 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)) count, MAX(n.nid) max, MIN(n.nid) min FROM node n WHERE n.nid <' at line 1 query: SELECT COUNT(DISTINCT DISTINCT(n.nid)) count, MAX(n.nid) max, MIN(n.nid) min FROM node n WHERE n.nid <> 0 AND n.status = 1 AND n.type IN ('artikel' [...]) in /var/www/drupal/includes/database.mysql.inc in Zeile 174.

Where I put [...] was a long list of content types I enabled for stumbling at ./admin/settings/stumble.

This error is recorded twice in the Watchdog log per click on the "random article" link.

Any ideas?

Thanks & greetings, -asb

Comments

Dave Reid’s picture

Status: Active » Closed (duplicate)

That's a bug with db_distinct_field: #284392: db_rewrite_sql causing issues with DISTINCT

asb’s picture

Are you sure? Over there, this seems to be a pure D6 issue...?

Greetings, -asb

Dave Reid’s picture

Actually it still needs to be backported to D5. See http://drupal.org/node/284392#comment-1835682