Follow up for #1801304-313: Add Entity reference field Task C


After picking entity reference for the display type,
if you scroll down to the preview section, you will see: red error: 'Display "EntityReference" needs a selected search fields to work properly. See the settings for the Entity Reference list format.'
But solution is go up and click on the format link and to pick the only option in a required setting. Silly to make a human do that.

Proposed resolution

Have EntityReference display default to whatever the "primary field" is of the given view type


Despite being scary, the message is descriptive, so click on "Settings" next to Entity Reference list. Suggest: just link right there from the error message directly

Remaining tasks

Discuss how this can be implemented

User interface changes

No UI changes.

API changes

Maybe API changes.

Original report by @webchick

#1801304-199: Add Entity reference field 7.

In a similar way that the Views wizard defaults to having User: Name field already populated, can the EntityReference display default to whatever the "primary field" is of the given view type?

FOLLOW-UP: Had the error been at the top of the page, I could've reacted faster. Not the fault of this patch. (I don't think.)


tim.plunkett’s picture

Issue tags: +VDC


swentel’s picture

Component: field system » entity_reference.module

Moving to right component

swentel’s picture

Issue summary: View changes

Updated issue summary add alternate solution

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.