Warning: Undefined array key "#mix_ajax_form"

Created on 16 October 2023, about 1 year ago
Updated 17 October 2023, about 1 year ago

Problem/Motivation

After installing 'drupal/mix:^1.8' get php warning Warning: Undefined array key "#mix_ajax_form" in mix_form_alter() (line 87 of /app/web/modules/contrib/mix/mix.module)

Steps to reproduce

Install composer require 'drupal/mix:^1.8'
When I check log files I get this output:

Warning: Undefined array key "#mix_ajax_form" in mix_form_alter() (line 87 of /app/web/modules/contrib/mix/mix.module)
#0 /app/web/core/includes/bootstrap.inc(347): _drupal_error_handler_real(2, 'Undefined array...', '/app/web/module...', 87)
#1 /app/web/modules/contrib/mix/mix.module(87): _drupal_error_handler(2, 'Undefined array...', '/app/web/module...', 87)
#2 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(562): mix_form_alter(Array, Object(Drupal\Core\Form\FormState), 'webform_edit_fo...')
#3 /app/web/core/lib/Drupal/Core/Form/FormBuilder.php(840): Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object(Drupal\Core\Form\FormState), 'webform_edit_fo...')
#4 /app/web/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->prepareForm('webform_edit_fo...', Array, Object(Drupal\Core\Form\FormState))
#5 /app/web/modules/contrib/webform/src/Form/WebformEntityAjaxFormTrait.php(123): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\webform_ui\WebformUiEntityElementsForm), Object(Drupal\Core\Form\FormState))
#6 /app/web/modules/contrib/webform/src/Form/WebformAjaxFormTrait.php(225): Drupal\webform_ui\WebformUiEntityElementsForm->cancelAjaxForm(Array, Object(Drupal\Core\Form\FormState))
#7 [internal function]: Drupal\webform_ui\WebformUiEntityElementsForm->submitAjaxForm(Array, Object(Drupal\Core\Form\FormState), Object(Symfony\Component\HttpFoundation\Request))
#8 /app/web/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array(Array, Array)
#9 /app/web/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(109): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse(Object(Symfony\Component\HttpFoundation\Request), Array, Object(Drupal\Core\Form\FormState), Array)
#10 [internal function]: Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#11 /app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#12 /app/vendor/symfony/http-kernel/HttpKernel.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...')
#13 /app/vendor/symfony/http-kernel/HttpKernel.php(92): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Drupal\Core\Form\FormAjaxException), Object(Symfony\Component\HttpFoundation\Request), 1)
#14 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /app/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /app/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /app/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#24 {main}

🐛 Bug report
Status

Fixed

Version

1.8

Component

Code

Created by

🇺🇸United States adrianm6254

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024