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.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | screencast-drupal11_ddev_site-2025_02_04-05_02_37.gif | 1.54 MB | scott_euser |
| #6 | Screenshot 2025-02-03 at 11.06.30 AM.png | 334.9 KB | jphelan |
| #6 | Screenshot 2025-02-03 at 11.05.14 AM.png | 245.77 KB | jphelan |
| #6 | Screenshot 2025-02-03 at 11.04.40 AM.png | 175.37 KB | jphelan |
Issue fork viewsreference-3503734
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
scott_euser commentedThanks 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.
Comment #5
scott_euser commentedHmm yeah that MR didn't work at all clearly; anyways will wait until we have more info
Comment #6
jphelan commentedGlad 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.

Comment #7
scott_euser commentedHmmm 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?
Comment #8
scott_euser commented