I get the following warning on the Dashboard Overview page:

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 '<> 0 OR (.uid = 34 AND 34 <> 0) OR 0 = 1 ) count_alias' at line 3 query: SELECT COUNT(*) FROM (SELECT title FROM district_comments comments WHERE .status <> 0 OR (.uid = 34 AND 34 <> 0) OR 0 = 1 ) count_alias in /srv/www/htdocs/acquia/modules/acquia/views/includes/view.inc on line 729.

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 '<> 0 OR (.uid = 34 AND 34 <> 0) OR 0 = 1 LIMIT 0, 5' at line 4 query: SELECT title, nid FROM district_comments comments WHERE .status <> 0 OR (.uid = 34 AND 34 <> 0) OR 0 = 1 LIMIT 0, 5 in /srv/www/htdocs/acquia/modules/acquia/views/includes/view.inc on line 755.

This occurs with the admin user and the other uses I've tested it with. The page *seems* to load and function correctly, however. I have run update.php and flushed all my caches with no luck. Any ideas?

Comments

FunkMonkey’s picture

Title: SQL Syntax working on Overview page » SQL Syntax warning on Overview page

Oh.. and the warning mentions comments.. which are currently turned off on my site.

And just saw that the warning only appears on the Comments tab.. the other tabs show no warning (expect the overview, which makes sense).

jenlampton’s picture

I don't test for the presence of comments before these views are built and displayed. The whole thing needs to be a little more sensitive to possible scenarios, I'll put this on my to-do list. Thanks!
Jen

FunkMonkey’s picture

Thanks Jen. I've disabled that View in the meantime. Pretty easy fix!

jenlampton’s picture

Status: Active » Fixed

@FunkMonkey,

In the 1.1 release I check for each module before I add views that are specific to it, comments, taxonomy, and statistics. This should get rid of all the scary errors. Thanks for pointing them out.

Jen

Status: Fixed » Closed (fixed)

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