Problem/Motivation

The views relationship plugin doesn't work inside workspaces because it doesn't join the entity queue items revision data and has no condition/join for the current workspace.

Steps to reproduce

TBD.

Proposed resolution

Add an new relationship handler that joins queue items revision data and workspaces as necessary.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

s_leu created an issue. See original summary.

amateescu’s picture

Status: Active » Needs work

Looked at this for a long time, and I think it should be fixed with a combination of changes in core Workspaces and our custom relationship handler, but I couldn't get to an actual proposal yet, so let's go with what we have here if it works.

I'd like to see a few changes to the MR though: in order to allow this fix to be applied without having to do any manual config updates on existing sites, let's put all the new code in the existing relationship handler, inside additional methods that kick in only if the workspaces module is enabled and if there's an active workspace.

s_leu’s picture

Status: Needs work » Needs review

Thanks for the review, I addressed the feedback.

  • amateescu committed b124c65a on 8.x-1.x authored by s_leu
    Issue #3489180: Support for entityqueue views plugin inside workspaces
    
amateescu’s picture

Title: Support for entityqueue views plugin inside workspaces » Support for entityqueue views relationship inside workspaces
Status: Needs review » Fixed

Still hoping that this is a temporary solution.. merged into 8.x-1.x, thanks!

Status: Fixed » Closed (fixed)

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

joao.ramos.costa’s picture

Hi everyone,

still investigating but I think there's some issues when commit b124c65a introduced entityqueue_views_query_alter.
1 - This line if (\in_array('entityqueue_relationship', $join_ids, TRUE)) { :
It should look for relationship plugin 'id' and not for its key as we might have more than one relationship where _n is appended.
2 - The expression $subquery->addExpression("MAX($revision_table.{$keys['revision']})", $keys['revision']);
Doesn't seem to take into account when 'limit_queue' option from entity_queue ViewsRelationship is set, or more than an entity_queue, I guess.
3- entity_subqueue_revision table doesn't include the parent queue, in case of a subqueue set as 'limit_queue', so it makes dificult to add a condition clause here too.

Again, sorry to be introducing so many questions. Thanks for the work involved here, it's actually not an easy problem to deal with.