I have a blog content type that has a multiple image field. Anytime I try to edit a node of this type that has several images and save it, I get the following error:

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 ') FROM content_type_menu_item WHERE = 145' at line 1 query: SELECT count() FROM content_type_menu_item WHERE = 145 in public_html/sites/all/modules/filefield/filefield.module on line 1018.

The content types in the SQL are completely different content types! What is going on?

And none of the changes I make are being saved. Saving is failing. Very infuriating.

Any help would be much appreciated.

Thanks!

Comments

jazzdrive3’s picture

This JUST starting happening today. Nothing has changed, so I'm not sure why I have suddenly started getting errors and can't edit content.

jazzdrive3’s picture

One clue: The menu item and restaurant content types have a single item filefield/imagefield.

The blog has an "unlimited" filefield/imagefield.

I removed the single filefield/imagefields from their respective content types, and suddenly the errors stopped.

So having different content types, some with single filefields but others with unlimited filefields, seems to be the trigger for this.

quicksketch’s picture

Status: Active » Closed (cannot reproduce)

If you can give me steps to reproduce this problem from a fresh install I'll look, but this is too obscure to reproduce/fix. I'm highly skeptical that FileField would be responsible to begin with, but given steps I'd be happy to take a look.

danieldennis’s picture

StatusFileSize
new255.81 KB

I am also experiencing this issue after an upgrade from Drupal 5 to 6. Attaching error message.