Edit link in HTMX Block listing is throwing an error

Created on 30 May 2024, 6 months ago
Updated 13 June 2024, 6 months ago

Problem/Motivation

The Edit button in the HTMX block list no longer triggers the edit form,

Steps to reproduce

  1. Browse to admin/structure/htmx-block
  2. Create a block and save
  3. Click the edit link for the new block

InvalidArgumentException: "hx-select" is an invalid render array key. Value should be an array but got a string. in Drupal\Core\Render\Element::children() (line 97 of /var/www/html/docroot/core/lib/Drupal/Core/Render/Element.php).

#0 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(1023): Drupal\Core\Render\Element::children(Array)
#1 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm('htmx_block_edit...', Array, Object(Drupal\Core\Form\FormState))
#2 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm('htmx_block_edit...', Array, Object(Drupal\Core\Form\FormState))
#3 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(1069): Drupal\Core\Form\FormBuilder->doBuildForm('htmx_block_edit...', Array, Object(Drupal\Core\Form\FormState))
#4 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(579): Drupal\Core\Form\FormBuilder->doBuildForm('htmx_block_edit...', Array, Object(Drupal\Core\Form\FormState))
#5 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm('htmx_block_edit...', Array, Object(Drupal\Core\Form\FormState))
#6 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\htmx\Form\HtmxBlockForm), Object(Drupal\Core\Form\FormState))
#7 /var/www/html/docroot/modules/htmx/src/Controller/HtmxBlockAdminController.php(159): Drupal\Core\Entity\EntityFormBuilder->getForm(Object(Drupal\htmx\Entity\HtmxBlock), 'edit')
#8 [internal function]: Drupal\htmx\Controller\HtmxBlockAdminController->blockEditForm('help')
#9 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#10 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#12 /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#13 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#15 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/docroot/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(737): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#27 {main}

Proposed resolution

  1. Find and resolve the unintended change
  2. Add a nightwatch test to catch such a break in the future.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.1

Component

Drupal Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

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

Comments & Activities

Production build 0.71.5 2024