When autocomplete widget is chosen for a field and form with this widget got rebuild "target_id" is set to empty string which then get passed to entity_load() in entityreference_field_widget_form() and triggering "PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer" with PostgreSQL. This is not a problem for MySQL.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoSk0 created an issue. See original summary.

RoSk0’s picture

Provided patch makes sure that "target_id" set for empty widget is not an empty string.

Status: Needs review » Needs work

The last submitted patch, 2: entityreference-2765885-2.patch, failed testing.

RoSk0’s picture

Status: Needs work » Needs review

Re-roll against latest version.

RoSk0’s picture