Cannot edit and save EntityRef custom fields
Overview
In testing PR 25927, I ran into a bug when trying to edit an EntityRef custom field, which then prevents saving those changes.
Reproduction steps
- Create a custom field of type EntityRef with any entity.
- Click Edit Field.
- Click Save, with or without making changes, on the pop up editor.
- The field is not saved and instead the user is told 'Selecting an entity is required'.
Current behaviour
A user cannot edit an EntityRef custom field becuase CiviCRM thinks that an entity is not selected, even though it already has been. A user also cannot select the field to try to 're-select' the chosen entity.
Expected behaviour
A user should be able to edit and save an EntityRef custom field, i.e. CiviCRM should recognize that an entity has been selected.
Environment information
- CiviCRM: 5.61.alpha1, _Master/5.62.alpha1