- Issue created by @butterwise
When the Workspaces module is enabled, Views that use an Entityqueue relationship and filter fail to return any results, even when content exists in the queue. This appears to be a compatibility issue between Entityqueue and Workspaces.
This issue is present on a site running Drupal 10.4.7 with Workspaces enabled, and Entityqueue version 8.x-1.9.
Here is the query for a view which includes a queue as a filter criteria prior to Workspaces being enabled:
SELECT "entity_subqueue__items"."delta" AS "entity_subqueue__items_delta", "node_field_data"."nid" AS "nid", "items_node_field_data"."name" AS "items_node_field_data_name"
FROM
{node_field_data} "node_field_data"
LEFT JOIN {entity_subqueue__items} "entity_subqueue__items" ON node_field_data.nid = CAST(entity_subqueue__items.items_target_id AS UNSIGNED) AND entity_subqueue__items.bundle = 'large_feature_slider'
LEFT JOIN {entity_subqueue_field_data} "items_node_field_data" ON entity_subqueue__items.entity_id = items_node_field_data.name
WHERE ("node_field_data"."status" = '1') AND ("node_field_data"."type" IN ('feature_slide')) AND ((entity_subqueue__items.items_target_id IS NOT NULL))
ORDER BY "entity_subqueue__items_delta" ASC
LIMIT 3 OFFSET 0
...and here is the query for the same view after the Workspaces module has been enabled:
SELECT "entity_subqueue__items"."delta" AS "entity_subqueue__items_delta", "node_field_data"."nid" AS "nid", "items_node_field_data"."name" AS "items_node_field_data_name"
FROM
{node_field_data} "node_field_data"
LEFT JOIN {entity_subqueue__items} "entity_subqueue__items" ON node_field_data.nid = CAST(entity_subqueue__items.items_target_id AS UNSIGNED) AND entity_subqueue__items.bundle = 'large_feature_slider'
LEFT JOIN {entity_subqueue_field_data} "items_node_field_data" ON entity_subqueue__items.entity_id = items_node_field_data.name
WHERE (("node_field_data"."status" = '1') AND ("node_field_data"."type" IN ('feature_slide')) AND ((entity_subqueue__items.items_target_id IS NOT NULL))) AND (("entity_subqueue__items"."revision_id" IN (SELECT MAX(entity_subqueue_revision.revision_id) AS "revision_id"
FROM
{entity_subqueue_revision} "entity_subqueue_revision"
WHERE "revision_default" = '1')) OR ("entity_subqueue__items"."revision_id" IS NULL))
ORDER BY "entity_subqueue__items_delta" ASC
LIMIT 3 OFFSET 0
It appears that when Workspaces is enabled, Views that join against entity_subqueue__items are affected by additional revision-based conditions that interfere with expected results. Specifically, Views adds the following clause when Workspaces is enabled:
AND (("entity_subqueue__items"."revision_id" IN (SELECT MAX(entity_subqueue_revision.revision_id) AS "revision_id"
FROM
{entity_subqueue_revision} "entity_subqueue_revision"
WHERE "revision_default" = '1')) OR ("entity_subqueue__items"."revision_id" IS NULL)
This clause seems incompatible with how Entityqueue currently stores or relates its items in Views, especially when the “Content in queue” filter is used.
A possible resolution might involve updating the Views relationship plugin for entityqueue to properly account for revisions and workspace context, similar to how revision-aware entities (like nodes or paragraphs) handle it.
Active
1.9
Code