I just installed the Live Discussions module and after I enable the Live Discussions block I see the following error.
You have an error in your SQL syntax near 'ON n.nid = c.nid WHERE c.status = 0 GROUP BY c.nid ORDER BY the_time DESC LIMIT' at line 1 query: SELECT DISTINCT(c.nid), n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM comments c JOIN node n ON n.nid = c.nid WHERE c.status = 0 GROUP BY c.nid ORDER BY the_time DESC LIMIT 15 in /var/www/html/includes/database.mysql.inc on line 66.

Drupal 4.6.2 and mySQL 3.23.58

Comments

Prometheus6’s picture

Category: bug » support
SELECT DISTINCT(c.nid), n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM comments c JOIN node n ON n.nid = c.nid WHERE c.status = 0 GROUP BY c.nid ORDER BY the_time DESC LIMIT 15

This query, from the error message, does not fail when run in MySQL directly. There must be something unusual in your configuration.

Prometheus6’s picture

Status: Active » Postponed

Gentlemen:

Having seen this duplicate issue:
http://drupal.org/node/27800

A clean install of 4.6.2, plus the Live Discussion module, has no errors. There was a recent change though:
http://drupal.org/node/27331

...that shows incompatibilities between modules is possible. To find the incompatibility you must

  1. Shut off every optional module except Live Discussion
  2. Re-enable your modules one at a time (or at least in bunches of three or fewer) until the conflict arise
theneuralgourmet’s picture

Status: Postponed » Active

Thank you. I will try disabling all extra modules and re-enabling one by one.

theneuralgourmet’s picture

Drat. That did not work. I disabled all extra modules and then re-enabled the Live Discussion module and still got the same error.

Prometheus6’s picture

I don't know what to tell you. I can't duplicate the problem under Windows or Linux.

theneuralgourmet’s picture

Oh, thanks for your help. It's good to know that it isn't a problem with the module so much as it is a problem with some conflict. And I do have a large number of modules enabled.

I was just looking at my notes and see that I never did the full upgrade to 4.6.2 but rather just applied the XML-RPC vulnerability patch. So perhaps if back up my database and then do a fresh install of 4.6.2 with the current versions of all the modules I am using that may help.

FWIW: I also discovered that if I enable the Search module I also get MySQL errors.

Thanks again for your help in diagnosing this issue.

Prometheus6’s picture

Status: Active » Closed (fixed)