Skip to content

Queries always use "live" workspace, leading to unexpected results #196

Open

Description

@kdambekalns

When using queries in Fusion to fetch nodes, a condition on the workspace is added, always restricting results to the live workspace.

This leads to unexpected results, since changes from a workspace that affect those queries will not be observed.

The queries should usually be working on the workspace that is currently shown (personal workspace, preview workspace, …).

Activity

  1. kdambekalns commented on Mar 1, 2017

    @kdambekalns
    MemberAuthor

    Ok, it's not always live:

    $this->queryFilter('terms', ['__workspace' => array_unique(['live', $contextNode->getContext()->getWorkspace()->getName()])]);

    (see

    $this->queryFilter('terms', ['__workspace' => array_unique(['live', $contextNode->getContext()->getWorkspace()->getName()])]);
    )

    That also explains why some of those queries work as expected, it all boils down to the workspace the $contextNode has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions