Problem: Enabling conditional field dependeny on an entity reference field type using autocomplete will cause that specific field to not be saved or updated. The rest of the node and its fields get saved/updated. Disabling the conditional field module (dependency) on the affected field resolves the issue.

In short, there is something that the conditional fields module is doing that is preventing the saving and updating of an entity reference + autocomplete field type.

The workaround is to just avoid creating a dependency with the conditional field module. If you really need to show/hide a field visually without any fancy validations or checks, then write your own jQuery conditions until this is fixed.

More information:

entity type: node

field type: entity reference with autocomplete targeting a node

conditional field dependencies: show a field when a checkbox is a certain value

possible module interferences: entity reference module


Riari’s picture

Confirmed, I've just been able to reproduce this with Conditional Fields 7.x-3.x-dev and Entity Reference 7.x-1.0.

lauriii’s picture

I cannot reproduce this

lauriii’s picture

Issue summary: View changes


sylwester’s picture

same here. for me it actually is for all widgets. this is in combination with date field.

removing date field solves the problem.

effects only node/add. node is added event though initially drupal render db error below. then node edit saves without any problems

PDOException: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'field_date_taken_passed_value' at row 1: INSERT INTO {field_data_field_date_taken_passed} (entity_type, entity_id, revision_id, bundle, delta, language, field_date_taken_passed_value) 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); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 141 [:db_insert_placeholder_2] => 478 [:db_insert_placeholder_3] => training_record [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 2013-11-08 ) in field_sql_storage_field_storage_write() (line 451 of .../modules/field/modules/field_sql_storage/field_sql_storage.module).