Problem/Motivation

It is not possible to add Conditions as successors to either an Event or an Action.

Conditions are not correctly or completely shown in the dropdown selector used to add successors. Rather there is a ‘empty’ slot for each Condition.

If you ‘select’ one of these ‘empty’ slots (on perhaps the basis that there is only the one condition, so you know that it has to be the empty slot), the form will not allow you to add it.

This worked as expected in alpha 2, so presumably a change to alpha 3 has introduced the issue.

Note that Actions are shown as expected in their selector, and can be added.

Steps to reproduce

1. Create a new model
2. Add an Event
3. Add one or more Conditions and Actions to the model
4. Navigate to the Event screen and attempt to add a Condition as a successor

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Anonymous’s picture

Janner created an issue. See original summary.

Anonymous’s picture

The following Php error appears in Watchdog:

Warning: Undefined array key "label" in Drupal\eca_cm\Form\EcaPluginForm->buildForm() (line 327 of and 2 more items #0 /public_html/core/includes/bootstrap.inc(347): _drupal_error_handler_real(2, 'Undefined array...', '/...', 327)
#1 /public_html/modules/contrib/eca_cm/src/Form/EcaPluginForm.php(327): _drupal_error_handler(2, 'Undefined array...', '/...', 327)
#2 [internal function]: Drupal\eca_cm\Form\EcaPluginForm->buildForm(Array, Object(Drupal\Core\Form\FormState), Object(Drupal\eca\Entity\Eca), Object(Drupal\eca_user\Plugin\ECA\Event\UserEvent), 'user_login', Array)
#3 /public_html/core/lib/Drupal/Core/Form/FormBuilder.php(531): call_user_func_array(Array, Array)
#4 /public_html/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm('eca_cm_event', Object(Drupal\Core\Form\FormState))
#5 /public_html/core/lib/Drupal/Core/Form/FormBuilder.php(219): Drupal\Core\Form\FormBuilder->buildForm('Drupal\\eca_cm\\F...', Object(Drupal\Core\Form\FormState))
#6 /public_html/modules/contrib/eca_cm/src/Controller/CoreModeller.php(152): Drupal\Core\Form\FormBuilder->getForm('Drupal\\eca_cm\\F...', Object(Drupal\eca\Entity\Eca), Object(Drupal\eca_user\Plugin\ECA\Event\UserEvent), 'user_login', Array)
#7 [internal function]: Drupal\eca_cm\Controller\CoreModeller->editEvent(Object(Drupal\eca\Entity\Eca), 'user_login')
#8 /public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#9 /public_html/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#10 /public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#11 /public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#12 /vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 /vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#14 /public_html/modules/contrib/redirect_after_login/src/RedirectMiddleware.php(46): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Drupal\redirect_after_login\RedirectMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /public_html/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(320): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /public_html/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#26 {main} .
mxh’s picture

Version: 1.0.0-alpha3 » 1.0.x-dev
Assigned: Unassigned » mxh

Will have a look.

  • mxh committed 0eb99c1 on 1.0.x
    Issue #3303283 by Janner, mxh: Cannot add Conditions as successors
    
mxh’s picture

Assigned: mxh » Unassigned
Status: Active » Needs review

I have pushed another release 1.0.0-alpha4, please have a look whether it fixes the problem.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Fixed here.

Thank you for the incredibly fast investigation and resolution.

mxh’s picture

Status: Reviewed & tested by the community » Fixed

Pleasure, thanks for reporting back.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.