When using Bean with an autocomplete EntityReference field, the autocomplete text field uses the bean's optional title field to indicate the block rather than the label, thus making the editorial process more confusing than it should be.

Comments

Approaching this from both sides - a corresponding request for the EntityReference module: #1911266: autocomplete field should use field selected for sorting

Status:Active» Closed (duplicate)

Duplicate of #1916938: Empty block name in entity reference field. I'm moving to that one since it has a better description.

Version:7.x-1.0-rc10» 7.x-1.x-dev
Status:Closed (duplicate)» Active

Sorry to reopen but this isn't really a duplicate of #1916938: Empty block name in entity reference field.
Having an empty title for a Bean makes it unfindable via Entity reference. On the other hand if you have multiple Beans with identical titles (but different labels) it is not possible to find the correct bean to insert.
Adding this simple sub-class of EntityReference_SelectionHandler_Generic fixes this UX problem (at least it has been fixed for us ;) ):

<?php
/**
* A selection handler for Bean entities.
*/
class EntityReference_SelectionHandler_Generic_bean extends EntityReference_SelectionHandler_Generic {
 
/**
   * Implements EntityReferenceHandler::getLabel().
   */
 
public function getLabel($entity) {
    return
$entity->label;
  }
}
?>

Issue summary:View changes
Status:Active» Needs work

@stBorchert can you please format this as a patch so I can see the full impact.