Entity reference for feed imports not working on some referenced nodes I've posted this problem on drupal.org but I feel that it's so cryptic that maybe it deserves a larger audience.

For some reason, when I'm trying to import users that are associated with group nodes some imported users do not have any referenced group nodes associated.

I've noticed that the group nodes that cannot be referenced are only nodes that have been imported via a previous feeds import. Despite this, users that are created through the user creation form CAN be associated with the group nodes that do not work through the feeds import process.

There are two php warnings that occur when an entity reference cannot be created through the feeds process:

Warning: array_keys() expects parameter 1 to be array, boolean given in entityreference_feeds_set_target() (line 132 of /home/angelo/dev/client/profiles/openatrium/modules/contrib/entityreference/entityreference.feeds.inc).

Warning: reset() expects parameter 1 to be array, null given in entityreference_feeds_set_target() (line 134 of /home/angelo/dev/client/profiles/openatrium/modules/contrib/entityreference/entityreference.feeds.inc).

This implies that for some reason
127: $handler->getReferencableEntities($value, '=')
isn't returning what it's supposed to and I'm not too sure why.

Has anyone else run into this issue?
Fixed. It turns out there were erroneous microsoft nbsp characters in the feed CSV that looked exactly like spaces. This resulted in the referenced entity not being found.

Removing these characters made the feed work correctly.