
Problem/Motivation
If AI Automators is enbled. When updating a content type, for example setting a field from required to not required, and the 'Enable AI Automator' checkbox is unchecked: then the form still tries to validate the field 'automator_search_index'
This field does not have a default value therefore triggers the front end validation and the javascript error:
'An invalid form control with name='automator_search_index' is not focusable.
…'
Steps to reproduce
- Enabled AI automators
- Edit an existing content type
- Manage fields
- Leave 'Enable AI Automator' unchecked
- Change a setting, eg. Required
- Save Changes
Proposed resolution
Set the field to '#required' => FALSE
Comments
Comment #2
prashant.c@jonnytoomey
I could not replicate this issue. I believe there could be some custom javascript code or library that you might be using which is trying to find the element which is not visible on the page hence throwing this error in browser console.
Comment #3
marcus_johansson CreditAttribution: marcus_johansson at FreelyGive commentedThis is fixed here for 1.1.x branch - #3514474: Vector Search view has a required value causing saving of field to fail. We could tag it so it is also backported to 1.0.0 if needed?
Comment #4
marcus_johansson CreditAttribution: marcus_johansson at FreelyGive commentednvm - it is backported, there is just no new release for 1.0.x branch since.
Comment #5
jonnytoomey CreditAttribution: jonnytoomey commentedThank you @marcus_johansson
Working now with 1.1@RC
I'll close this issue now
Comment #6
jonnytoomey CreditAttribution: jonnytoomey commented