Using drupal 4.2.0, image.module 4.2.0

When clicking on the 'Read More' or 'Add Comment' links for an image node, I am presented with this error:

user error: 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 'ORDER BY n.title' at line 6
query:
SELECT n.nid, n.title, n.teaser, n.body, i.thumb_path
FROM node n, term_node t, image i
WHERE n.nid = t.nid
AND n.nid = i.nid
AND i.personal = 0
AND t.tid = ORDER BY n.title in /home/eli/virtualeli/ve3/drupal/includes/database.mysql.inc on line 75.

Can also be seen here:
http://www.virtualeli.com/drupal/?q=node/view/11

Any ideas?

Comments

theview’s picture

I'm getting the exact same message ... it occurs when I try to create a new image module and click on "preview." I haven't tried to find it anywhere else, though.

user error: You have an error in your SQL syntax near 'ORDER BY n.title' at line 7
query: 
          SELECT n.nid, n.title, n.teaser, n.body, i.thumb_path
          FROM node n, term_node t, image i
          WHERE n.nid = t.nid
          AND n.nid = i.nid
          AND i.personal = 0
          AND t.tid =  ORDER BY n.title in /home/httpd/htdocs/includes/database.mysql.inc on line 75.

check out our website...View Online

lukeperman’s picture

i have exactly the same error. can't get an image to upload any way how...

tried re-installing the mySQL tables as root and drupal user, but no luck

would love to see a solution to this......

netoli’s picture

would like to use it but can't

killes@www.drop.org’s picture

is posted just a few comments higher...
One of your image nodes does not have a term from the image vocabulary.

netoli’s picture

I did set the image vocabulary.
But still the same sql error.
Do I need to delete the old entries ?

killes@www.drop.org’s picture

You do not only need to set the vocabulary, you need also to ensure that every image node has at least on term from this vocabulary set. Try to edit a image node and assign a term from the vocabulary to the node.

virtualeli’s picture

I just sent the maintainer of the module an email to check on this thread for us....with any luck!!!!

David Hull’s picture

The image module requires that an album be selected.
You will get this SQL error if no album (that is, "<none>")
is selectd.

The configuration page at
"Administration » site configuration » modules » image"
has a setting called "Gallery Navigation Vocabulary."
You create this vocabulary on the "Administration » taxonomy" page.
As the note for the gallery navigation vocabulary option mentions,
the vocabulary you use should be made required
so that you don't attempt
to submit an image without specifying an album.
The "<none>" option will not be offered as a choice.

theview’s picture

Worked! Thanks so much!

Now it's time to dissect this module to figure out how to insert random thumbnails in a block to be displayed on the front page...any ideas?