We followed all of the configuration steps using entities that we created using ECK (https://drupal.org/project/eck). In fact, we had 4 people (including 2 experienced Drupal developers) review the configuration per the instructions on https://drupal.org/project/entityreference_autofill and everyone agreed it was done properly. Everything went fine until the values were supposed to be populated.

When the destination entity reference field was populated, no other fields were populated.

We tried populating the entity reference manually as well as using prepopulate and got a notice in both cases:

Notice: Undefined index: in entityreference_autofill_field_attach_form() (line 102 of /www/sitekit/ted.sitekitdev.com/drupal/sites/all/modules/entityreference_autofill/entityreference_autofill.module).
Notice: Undefined index: in entityreference_autofill_field_attach_form() (line 103 of /www/sitekit/ted.sitekitdev.com/drupal/sites/all/modules/entityreference_autofill/entityreference_autofill.module).

We are willing to pay for assistance and consulting, and can provide a sandbox / URL so you can investigate the issue with us if that is helpful.

Comments

jgullstr’s picture

Status: Active » Needs review

Hi Counselnow,

Thanks for your report. I tried the module on a custom entity provided by ECK. It turns out ECK does not pass a $langcode when calling field_attach_form(), that is why the notices appeared and this module did not work. I have added fallback language conditions to the latest dev version (Commit 5275043), please check if that solves your issues and report back here.

//Josef

CounselNow’s picture

Status: Needs review » Active

Tested - it works now as long as I check the "Overwrite Existing Data"

If I leave this box unchecked, it doesn't populate the field with a value, even if the field is empty to begin with.

Thanks for the quick attention to this! Great module!

jgullstr’s picture

This is most likely due to this issue. What field type(s) are not populated? Does the module work for you on empty textfields with overwrite disabled?

//Josef

jgullstr’s picture

Status: Active » Postponed (maintainer needs more info)
jgullstr’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Parent issue: » #2142343: Empty fields not populated when "overwrite" is disabled.