Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After adding a new reaction rule, when I try to add an ation I get warnings on the second action configuration form page.
Warning: Invalid argument supplied for foreach() in Drupal\rules\Form\Expression\ActionForm->submitForm() (line 122 of modules/rules/src/Form/Expression/ActionForm.php).
Drupal\rules\Form\Expression\ActionForm->submitForm(Array, Object) Drupal\rules\Form\AddExpressionForm->validateForm(Array, Object) call_user_func_array(Array, Array) Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'rules_expression_add') Drupal\Core\Form\FormValidator->validateForm('rules_expression_add', Array, Object) Drupal\Core\Form\FormBuilder->processForm('rules_expression_add', Array, Object) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() call_user_func_array(Object, Array) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) Stack\StackedHttpKernel->handle(Object, 1, 1) Drupal\Core\DrupalKernel->handle(Object)
Strict warning: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\rules\Form\Expression\ActionForm::submitFirstStep() should not be called statically in Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (line 116 of core/lib/Drupal/Core/Form/FormSubmitter.php).
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) Drupal\Core\Form\FormBuilder->processForm('rules_expression_add', Array, Object) Drupal\Core\Form\FormBuilder->buildForm(Object, Object) Drupal\Core\Controller\FormController->getContentResult(Object, Object) call_user_func_array(Array, Array) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() call_user_func_array(Object, Array) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) Stack\StackedHttpKernel->handle(Object, 1, 1) Drupal\Core\DrupalKernel->handle(Object)
Comments
Comment #2
fagoadded related #2659808: Improve browser tests to check for PHP errors and/or errors in watchdog
Comment #3
klausiCogax opened a PR for this at https://github.com/fago/rules/pull/380
Comment #4
Cogax CreditAttribution: Cogax commentedComment #5
Cogax CreditAttribution: Cogax commentedIt would be helpful if someone can review my PR. I'm unsure if I'm doing it right.
Comment #6
Cogax CreditAttribution: Cogax commentedComment #8
klausiMerged with improved comments, thanks!