I have a form field on a node create form that is an entity reference, referencing a view that displays all of the appropriate results. The view displays users with a relationship to a content field on the user, so the fields returned are all content. There is also an argument that takes the logged-in user ID. On the node create form, the field in question, when set to show unlimited results, only shows the last result from the view. I feel like I've gone over any technical reason this could happen, now I'm wondering if this is a bug with user views, or elsewhere. I haven't found anyone reporting this yet in my searches, so I thought I'd post it here.

1 Answer 1


I was having this issue as well, and it came down to the view returning a different entity_id than the one(s) I thought it should be returning. This happens because of incorrectly formed relationships.

A way to check this is to add a "dpm($options);" (if you're using the devel module) in the entityreference_options_list function of entityreference/entityreference.module file (just after the $options are returned from entityreference_get_selection_handler) to see what options it is retrieving from the view.

I started a new Entity Reference view that just returned the entities that I wanted, and then I built my relationships backwards from there to finally get the correct number of entities in my form.

I hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.