Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kdambekalns opened this issue Mar 1, 2017 · 1 comment
Open
Labels

Comments

@kdambekalns
Copy link
Member

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, …).

@kdambekalns
Copy link
Member Author

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
Labels
Projects
None yet
Development

No branches or pull requests

1 participant