Problem/Motivation
Steps to reproduce -- I've got Drupal 8.8.5 and Entityqueue 8.x-1.0-rc1.
- Add a new entityqueue (/admin/structure/entityqueue/add)
- Choose "smart queue" (the log messages at steps 8-9 aren't happening when I choose "simple queue").
- When the next part of the form loads, choose "Content" (also happens with "taxonomy term" entity type).
- Now, a "notice" is logged in watchdog:
Type/Severity: php/notice
Location:https://www.mysite.com/admin/structure/entityqueue/add?_wrapper_format=drupal_ajax&_wrapper_format=drupal_ajax&ajax_form=1
Message:Notice: Undefined index: bundles in Drupal\entityqueue_smartqueue\Plugin\EntityQueueHandler\SmartQueue->buildConfigurationForm() (line 115 of /path/to/modules/contrib/entityqueue/modules/entityqueue_smartqueue/src/Plugin/EntityQueueHandler/SmartQueue.php)
>> Stacktrace pasted below this list of steps. - When the next part of the form loads, I chose the content type I wanted.
- Further down, I went to the "Entity settings" vertical tab.
- Choose "Content" (I haven't tried choosing other entity types).
- When the next part of the form loads, I choose a bundle.
- Now, a "notice" is logged in watchdog -- same details as the last on, but the location doesn't have the "_wrapper_format" param, so it's just
https://www.mysite.com/admin/structure/entityqueue/add?_wrapper_format=drupal_ajax&ajax_form=1(message is identical). - Then, I choose a "sort by" value, and save the new entity queue.
Secondary thing: I *swear* the first two times I tried this process, the progress bar happened after I hit "save" on the new smart queue, but no subqueues were generated -- I edited the entity queue configuration, and the content type that I selected the first time wasn't selected, so I checked the box again, hit save, and then the subqueues were generated. But, trials 3, 4, 5, and 6 didn't have this problem, so, I'm sharing the info in this "secondary" comment, because is isn't as consistent -- but like, if I hadn't checked a box next to a content type, it wouldn't let me save the "add new entityqueue" form, b/c it's a required field... ANYWAY, just saying :)
UPDATE: I reproduced this "secondary" issue when I created smart queues for taxonomy terms -- when I created new smart queues for taxonomy terms, the subqueues were not generated. I configured the new entity queues, re-selected the vocabulary (no vocabs were selected when I went to configure the entity queue), saved, and the subqueues were generated. I did this twice, then I added a new smart queue from a third vocabulary, and this third time, the subqueues were properly generated from the terms in that vocab. It feels like it has to generate subqueues from two smart queues of an entity type (or just saving the bundle setting for two smart queues of an entity type) before gets the hang of generating subqueues for an entity type (or just saving the bundle setting on a smart queue for an entity type)... I know it sounds bizarre, but that's the behavior I'm seeing :-/
>> I don't know if this bug is related to the "undefined index" bug, but the log message seems to be about "bundles" and the bundle setting for the smart queue isn't getting saved, so it feels related??
>> There are *no* watchdog entries in dblog for this bug -- the only log messages I get are the ones I trigger with the ajax form fields, as described in the numbered steps above.
>> Stacktrace for PHP notice:
Notice: Undefined index: bundles in Drupal\entityqueue_smartqueue\Plugin\EntityQueueHandler\SmartQueue->buildConfigurationForm() (line 115 of /path/to/web/modules/contrib/entityqueue/modules/entityqueue_smartqueue/src/Plugin/EntityQueueHandler/SmartQueue.php)
#0 /path/to/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', 'path/to...', 115, Array)
#1 /path/to/web/modules/contrib/entityqueue/modules/entityqueue_smartqueue/src/Plugin/EntityQueueHandler/SmartQueue.php(115): _drupal_error_handler(8, 'Undefined index...', 'path/to...', 115, Array)
#2 /path/to/web/modules/contrib/entityqueue/src/Form/EntityQueueForm.php(150): Drupal\entityqueue_smartqueue\Plugin\EntityQueueHandler\SmartQueue->buildConfigurationForm(Array, Object(Drupal\Core\Form\SubformState))
#3 /path/to/web/core/lib/Drupal/Core/Entity/EntityForm.php(149): Drupal\entityqueue\Form\EntityQueueForm->form(Array, Object(Drupal\Core\Form\FormState))
#4 [internal function]: Drupal\Core\Entity\EntityForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#5 /path/to/web/core/lib/Drupal/Core/Form/FormBuilder.php(520): call_user_func_array(Array, Array)
#6 /path/to/web/core/lib/Drupal/Core/Form/FormBuilder.php(370): Drupal\Core\Form\FormBuilder->retrieveForm('entity_queue_ad...', Object(Drupal\Core\Form\FormState))
#7 /path/to/web/core/lib/Drupal/Core/Form/FormBuilder.php(627): Drupal\Core\Form\FormBuilder->rebuildForm('entity_queue_ad...', Object(Drupal\Core\Form\FormState), Array)
#8 /path/to/web/core/lib/Drupal/Core/Form/FormBuilder.php(320): Drupal\Core\Form\FormBuilder->processForm('entity_queue_ad...', Array, Object(Drupal\Core\Form\FormState))
#9 /path/to/web/core/lib/Drupal/Core/Controller/FormController.php(91): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\entityqueue\Form\EntityQueueForm), Object(Drupal\Core\Form\FormState))
#10 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#11 /path/to/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#12 /path/to/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 /path/to/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#14 /path/to/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#15 /path/to/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#16 /path/to/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#17 /path/to/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /path/to/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /path/to/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /path/to/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /path/to/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /path/to/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /path/to/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /path/to/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /path/to/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#26 {main}Proposed resolution
(Description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch.)
Remaining tasks
(reviews needed, tests to be written or run, documentation to be written, etc.)
User interface changes
(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)
API changes
(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)
Data model changes
(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)
Release notes snippet
(Major and critical issues should have a snippet that can be pulled into the release notes when a release is created that includes the fix)
Original report by [username]
(Text of the original report, for legacy issues whose initial post was not the issue summary. Use rarely.)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3127340.patch | 639 bytes | amateescu |
Comments
Comment #2
alisonupdated description re: entity types
Comment #3
alisonComment #4
alisonComment #5
amateescu commentedThis should fix it :)
Comment #6
alisonTested -- works perfectly -- no more log messages, and when I created smart queues of entity types for which I hadn't created smart queues previously, it properly generated the subqueues the first time.
Thank you!
Comment #8
amateescu commentedAwesome, thanks for testing! Committed to 8.x-1.x :)
Comment #9
joseph.olstadsorry was mistaken, our issues start here:
#3058127: Convert subqueues to be revisionable, translatatable and publishable
Comment #10
joseph.olstad