I get this bug on attempting to save a node on Photoshare:

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ')' at line 1: INSERT INTO {field_data_field_contest_category} (entity_type, entity_id, revision_id, bundle, delta, language, field_contest_category_tid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, ); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 53512 [:db_insert_placeholder_2] => 99366 [:db_insert_placeholder_3] => image [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und ) in field_sql_storage_field_storage_write() (line 448 of /var/www/photoshare.org/htdocs/modules/field/modules/field_sql_storage/field_sql_storage.module).

The solution is to unset empty fields.

Comments

caesius’s picture

infines’s picture

Status: Active » Reviewed & tested by the community

Works

kid_icarus’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @caesius, you rock \m/

@gridbitlabs, thanks for testing this!

Committed to 7.x-1.x

Status: Fixed » Closed (fixed)

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