I'm getting following error when trying to link 2 node types: Support Contact and Asset.
I've done the both way reference between Asset and License, and there are no issues. I'm not sure what I'm doing wrong with Support and Asset, since I'm doing all same stuff. Can it be due to the same node being referenced to two different content types?

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_support_url} (entity_type, entity_id, revision_id, bundle, delta, language, field_support_url_value, field_support_url_title, field_support_url_attributes) 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, :db_insert_placeholder_6, :db_insert_placeholder_7, ); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 120 [:db_insert_placeholder_2] => 124 [:db_insert_placeholder_3] => support_contact [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => https://customer.cyberoam.com/customermyaccount/webpages/rtinterface/ticketevaluation.jsp [:db_insert_placeholder_7] => ) in field_sql_storage_field_storage_write() (line 448 of C:\wamp\www\modules\field\modules\field_sql_storage\field_sql_storage.module).

Comments

SGhosh’s picture

Category: support » bug

Anybody with the same problem for this version please refer to this post - http://drupal.org/node/1354816

The patch supplied there is labelled for Version: 7.x-4.x-dev but works for Version: 7.x-4.22 as well.

diff --git corresponding_node_references.crud.inc corresponding_node_references.crud.inc
index 583e39f..764d9c4 100644
--- corresponding_node_references.crud.inc
+++ corresponding_node_references.crud.inc
@@ -247,5 +247,6 @@ function corresponding_node_references_delete($home_node, $home_field, $away_nod
  * @param $node the referenced node to be updated.
  */
 function _corresponding_node_references_update(&$node) {
+  field_attach_presave('node', $node);
   field_attach_update('node', $node);
 }