Fixes #18944: Clearing widget type field no longer causes 500 error #18946
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #18944
I don't love this fix since the feedback to the user is pretty bad--it just resets the form to defaults without explaining what happened. I didn't find an easy way to include an error message for the 'Widget type' field on GET (so that it might show in the UI) but that may just be me missing something.
I also took a quick look at our
DynamicTomSelectcode and didn't see an immediate way to fix this there.Either way, I think it's worth getting at least this fix in for the time being to remove a potentially very visible 500 error for users with better user feedback in a follow up fix. But, I'm open to other options. Thoughts?