Error

You are trying to create a new ERPAL contact. Or add an address to an existing contact. When you click on "Save" button. ERPAL returns the following error message:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_endpoints0.endpoints_r_index' in 'where clause': SELECT DISTINCT field_data_endpoints_delta_0.entity_type AS entity_type, field_data_endpoints_delta_0.entity_id AS entity_id, field_data_endpoints_delta_0.revision_id AS revision_id, field_data_endpoints_delta_0.bundle AS bundle FROM {field_data_endpoints} field_data_endpoints_delta_0 INNER JOIN {field_data_endpoints} field_data_endpoints_delta_1 ON field_data_endpoints_delta_1.entity_type = field_data_endpoints_delta_0.entity_type AND field_data_endpoints_delta_1.entity_id = field_data_endpoints_delta_0.entity_id INNER JOIN {relation} relation ON relation.rid = field_data_endpoints_delta_0.entity_id WHERE (field_data_endpoints_delta_0.endpoints_entity_type = :db_condition_placeholder_0) AND (field_data_endpoints_delta_0.endpoints_entity_id = :db_condition_placeholder_1) AND (field_data_endpoints_delta_0.delta = field_data_endpoints_delta_0.delta) AND (field_data_endpoints_delta_1.endpoints_entity_type = :db_condition_placeholder_2) AND (field_data_endpoints_delta_1.endpoints_entity_id = :db_condition_placeholder_3) AND (field_data_endpoints_delta_1.delta = field_data_endpoints_delta_1.delta) AND (field_data_endpoints_delta_0.deleted = :db_condition_placeholder_4) AND (relation.relation_type = :db_condition_placeholder_5) AND (relation.arity = :db_condition_placeholder_6) AND (field_data_endpoints_delta_0.entity_type = :db_condition_placeholder_7) AND (field_data_endpoints0.endpoints_r_index != field_data_endpoints2.endpoints_r_index) ; Array ( [:db_condition_placeholder_0] => node [:db_condition_placeholder_1] => 54 [:db_condition_placeholder_2] => node [:db_condition_placeholder_3] => 56 [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => works_at [:db_condition_placeholder_6] => 2 [:db_condition_placeholder_7] => relation ) in field_sql_storage_field_storage_query() (line 632 of [***]/erpal/modules/field/modules/field_sql_storage/field_sql_storage.module).

Solution 1

Please double check that you installed the latest ERPAL for Service Providers "Development release 7.x-2.x-dev". It is more stable and contain lots of bug fixes. It is suggested to not install the "Recommended release" 7.x-2.2. As it is outdated.
The ERPAL version you are currently using is display at /admin/reports/status under "Install profile" section. It should contain the word: -dev.

Solution 2

Update your ERPAL to the latest ERPAL "Development release" 7.x-2.x-dev

Cause

That error message is cause by an outdated version of ERPAL "Recommended release" 7.x-2.2. Maybe you missed the important note on the module project page or missed the installation documentation. Which reads: "Please use the latest dev version currently or update the relation module to the latest version RC6. the relation module in its version RC5 has compatibility problems with the latest Drupal core 7.34."