Default auto pick the primary field for the type in view wizard to avoid red error: 'Display "EntityReference" needs a selected

Created on 31 January 2013, over 12 years ago
Updated 2 September 2025, about 1 month ago

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

Problem/Motivation

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

OR

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.

FEEDBACK:
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.)

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

entity system

Created by

πŸ‡ΊπŸ‡ΈUnited States yesct

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • VDC

    Related to the Views in Drupal Core initiative.

  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024