- Issue created by @butterwise
- 🇺🇸United States butterwise
Confirming @marcus.w's report: Rolling back to 8.x-1.8 allows Workspaces to be enabled and the views using entityqueue to function as expected.
Having said that, when working in a workspace, any changes made to an entityqueue (adding or removing an item or reordering items) result in a 500 error:
The website encountered an unexpected error. Try again later. Drupal\Core\Entity\EntityStorageException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'my_entityqueue' for column 'target_entity_id' at row 1: INSERT INTO "workspace_association" ("workspace", "target_entity_revision_id", "target_entity_type_id", "target_entity_id") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 0363dcf2-de53-430d-9804-a5eb22494101 [:db_insert_placeholder_1] => 8 [:db_insert_placeholder_2] => entity_subqueue [:db_insert_placeholder_3] => my_entityqueue ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). Drupal\Core\Database\StatementWrapperIterator->execute() (Line: 44) Drupal\mysql\Driver\Database\mysql\Insert->execute() (Line: 141) Drupal\workspaces\WorkspaceAssociation->trackEntity() (Line: 55) Drupal\wse\WseWorkspaceAssociation->trackEntity() (Line: 233) Drupal\workspaces\EntityOperations->entityUpdate() (Line: 160) workspaces_entity_update() call_user_func_array() (Line: 416) Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 395) Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 423) Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 217) Drupal\Core\Entity\EntityStorageBase->invokeHook() (Line: 900) Drupal\Core\Entity\ContentEntityStorageBase->invokeHook() (Line: 564) Drupal\Core\Entity\EntityStorageBase->doPostSave() (Line: 781) Drupal\Core\Entity\ContentEntityStorageBase->doPostSave() (Line: 489) Drupal\Core\Entity\EntityStorageBase->save() (Line: 806) Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (Line: 354) Drupal\Core\Entity\EntityBase->save() (Line: 282) Drupal\entityqueue\Form\EntitySubqueueForm->save() call_user_func_array() (Line: 129) Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67) Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597) Drupal\Core\Form\FormBuilder->processForm() (Line: 326) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() (Line: 80) Drupal\workspaces\Controller\WorkspacesHtmlEntityFormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741) Drupal\Core\DrupalKernel->handle() (Line: 19)
I am seeing the same issue with Drupal 10.4.8 and Entityqueue 8.x-1.9. When the Workspaces module is enabled, content queue relationships stop working in views. In my particular case, I was able to temporarily get around this bug by making sure that the queue in my view was the last one created on the site, so that
MAX(entity_subqueue_revision.revision_id)
would match my queue. This approach will obviously not work if multiple queues need to be used in view relationships.