Closed (fixed)
Project:
Custom Elements
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2024 at 14:30 UTC
Updated:
18 Oct 2024 at 11:04 UTC
Jump to comment: Most recent
Ajax errors when trying to add a field.
UnhandledMatchError: Unhandled match case NULL in Drupal\field_ui\Form\EntityDisplayFormBase->multistepAjax() (line 700 of /var/www/html/web/core/modules/field_ui/src/Form/EntityDisplayFormBase.php)
#0 /var/www/html/web/modules/contrib/custom_elements/modules/custom_elements_ui/src/Form/EntityCustomElementsDisplayEditForm.php(808): Drupal\field_ui\Form\EntityDisplayFormBase->multistepAjax()
#1 [internal function]: Drupal\custom_elements_ui\Form\EntityCustomElementsDisplayEditForm->multistepAjax()
#2 /var/www/html/web/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array()
#3 /var/www/html/web/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(112): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse()
#4 /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php(246): Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException()
...
#23 {main}
Drupal version above ^10.3.5 || ^11 and custom elements ^3.0.0. Visit custom elements display page and try to add a field.
Tested on Drupal 10.2.8 and it works fine.
Needs investigation.
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 #2
useernamee commentedComment #3
roderikWell... that's dumb! I was still developing on D10.2, and the "add field" button is broken on D10.3+.
Also, we don't have browser tests for the UI yet. We should, but realistically... that's not on the radar yet.
(A
switch()was replaced bymap()inEntityDisplayFormBase::multistepAjax(), which apparently means it cannot handle unknown values == any buttons that the Core code doesn't know about, anymore. Fine; I won't callparent::multistepAjax().)Comment #5
roderikCreating MR, but I might merge this myself. Unless someone prods me, that may wait until Monday morning, while I try to get some other fixes in a 3.0.1 release.
Comment #6
useernamee commentedTested on 10.3.5. Works fine thus merging.
The error is gone from the watchdog.
Comment #8
useernamee commented