Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Does this module support using realname? If not, it would be a very useful addition.
Comments
Comment #1
moonray CreditAttribution: moonray commentedAlso see #1194086: Real Name not working for user references comment #32.
Comment #2
Damien Tournoud CreditAttribution: 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 CreditAttribution: moonray commentedFantastic. :)
Comment #5
liquidcms CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Renee S commentedAlthough it does say that this should work, unfortunately it doesn't...
Comment #9
Renee S CreditAttribution: Renee S commented(To be clear, I mean the widget, not the display formatter. The formatter part works fine.)
Comment #10
julou CreditAttribution: julou commented+1 for adding this feature
Comment #11
Abelito CreditAttribution: 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