Active
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2011 at 14:25 UTC
Updated:
14 Jan 2016 at 06:37 UTC
Jump to comment: Most recent
Comments
Comment #1
moonray commentedAlso see #1194086: Real Name not working for user references comment #32.
Comment #2
damien tournoud commentedIn regard to #32: entityreference doesn't avoid entity_load() at all. We do query the tables directly (because we have no other choice), but we only get a list of ids and call entity_load() on it before using it.
So I guess that "Real Name" would work transparently.
Comment #3
moonray commentedFantastic. :)
Comment #5
liquidcms commentedsorry, why is this closed? i am pretty sure userref does not work with realname.
since the original title of this issue is quite broad "support for realname"; i'll suggest what i think the main use case for this would be:
when using an autocomplete field for userref, the autocomplete search should work off the user's realname and when selecting a result; it should show the realname as well. (this is the issue being discussed in the issue referred to above in #1)
this shows the issue clearly: http://screencast.com/t/7LHU5nVj, and of course entering "sa" does not return any results when it should return Sam Jones.
Comment #6
liquidcms commentedalthough it seems like this module should do this out of the box; it is possible to use an entity reference view which lists realnames as the source for this field - this will give the expected result
Comment #7
liquidcms commentedso close.. unfortunately using a view to pull results for autocomplete breaks the use of the references dialog module. so even though this will be a big limitation for that module (i'll post new issue there) the entity ref module should still do realname support without the need for views.
Comment #8
Renee S commentedAlthough it does say that this should work, unfortunately it doesn't...
Comment #9
Renee S commented(To be clear, I mean the widget, not the display formatter. The formatter part works fine.)
Comment #10
julou commented+1 for adding this feature
Comment #11
Abelito commentedHere is a workaround that I discovered:
1) Create an Entity Reference View with the fields you want to display (and search on), and select that view in your field's settings, under "Mode->View used to select the entities".
2) The Real Name (RealName) module needs a patch for autocomplete to work correctly with entityreference views. This patch works: https://www.drupal.org/node/985944#comment-10069094
Cheers