Problem/Motivation

It is not possible to use the Views Reference Field (both autocomplete/select) without JavaScript enabled as the widgets both require ajax and validate as such. This also prevents much faster Functional Tests.

Steps to reproduce

Try to create a node with a Views Reference Field with either widget with JS disabled

Proposed resolution

Instead of relying on isEmpty() validate that a display ID is selected for a View.
This also means that the field formatters must prevent display if no display ID is selected as isEmpty() is no longer relied on for that.

Remaining tasks

Update the code to work without JS
Add functional tests to cover that

User interface changes

Users without JS can now use the field

API changes

None

Data model changes

None

Command icon 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

scott_euser created an issue. See original summary.

scott_euser’s picture

Assigned: Unassigned » scott_euser
Status: Active » Postponed

scott_euser’s picture

Assigned: scott_euser » Unassigned
Status: Postponed » Needs review
scott_euser’s picture

(Ignore the Drupal CI test failures, the tests pass in Gitlab CI as expected, raised here #3453927: Disable Drupal CI)

scott_euser’s picture

Thanks for reviewing; thread 1 resolved, thread 2 showed screenshots of what submitForm() does under the hood which is actually filling in the fields and clicking the button, its more of a helper function to avoid having to repeat that code across tons of tests.

seanb’s picture

Status: Needs review » Fixed

Merged! Thanks again :)

seanb’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.