The referenced entity (view: _none) does not exist

Created on 1 February 2025, 2 months ago

I have a field that allows 3 values and I'm using the select display option for the form. The field is optional. If I try to set only one value and leave the other two empty I get this error.

The referenced entity (view: _none) does not exist.

Similarly, I can save the field settings because it seems to be throwing the same error for the default value field even though I don't have set default value checked. I see this error in the console when I try and save the field settings.

An invalid form control with name='default_value_input[field_views_blocks][0][display_id]' is not focusable. <select class=​"viewsreference-display-id form-select form-element form-element--type-select" data-drupal-selector=​"edit-default-value-input-field-views-blocks-0-display-id" id=​"edit-default-value-input-field-views-blocks-0-display-id" name=​"default_value_input[field_views_blocks]​[0]​[display_id]​" data-drupal-states=​"{"visible":​{":​input[name=\u0022default_value_input[field_views_blocks]​[0]​[target_id]​\u0022]​":​{"!value":​"_none"}​}​,"required":​{":​input[name=\u0022default_value_input[field_views_blocks]​[0]​[target_id]​\u0022]​":​{"!value":​"_none"}​}​}​" data-once=​"drupal-ajax states" required=​"required" aria-required=​"true">​…​</select>​

If I change the widget to autocomplete everything saves without error.

🐛 Bug report
Status

Active

Component

Code

Created by

🇺🇸United States jphelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @jphelan
  • First commit to issue fork.
  • 🇬🇧United Kingdom scott_euser

    Thanks or flagging; I would like to help investigate, but I think I need clearer steps from a clean D11 'Standard' profile install how to reproduce including what specific settings you selected/didn't select. I expect there is some situation where there are no Block displays in Views causing the issue but needs more step by step (with screenshots if you think they might help)

    I added some additional checks for now in the merge request here to check the Display ID selected exists since you flagged you left the display empty in 2 of your 3 fields but the error seems to indicate its related to the View itself not the Display, so this may not be helpful.

  • 🇬🇧United Kingdom scott_euser

    Hmm yeah that MR didn't work at all clearly; anyways will wait until we have more info

  • 🇺🇸United States jphelan

    Glad to help. I was able to get it working by changing it to an unlimited field so that there is only one value by default and you must use the add more button.

    I'm using the field in paragraphs with Layout Paragraphs and Paragraphs Editor Enhancements modules.

    The viewsreference field is set to limited and 3 values.

    Then adding that paragraph type on a new page gives an error if any of the fields are empty.

  • 🇬🇧United Kingdom scott_euser

    Hmmm I can't reproduce that with Manage Form Display -> "Views reference select list" widget:

    I can see that the "Views reference select list" extends the Drupal Core Options Select Widget which specifically has code in validation to convert '_none' to empty https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co...

    Are you maybe extending with your own field widget and overriding that validation in some way perhaps? Or perhaps some sort of form alter interfering with it?

  • Status changed to Postponed: needs info 8 days ago
Production build 0.71.5 2024