Skip to content

Commit

Permalink
BUGFIX: Ensure that ContentCacheFlusher registers all tags for actual…
Browse files Browse the repository at this point in the history
… node variant in workspace
  • Loading branch information
grebaldi committed Feb 15, 2024
1 parent a209f3a commit c99cd8b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ protected function addTagToFlush(string $tag, string $message = ''): void

protected function registerAllTagsToFlushForNodeInWorkspace(NodeInterface $node, Workspace $workspace): void
{
// Ensure that we're dealing with the variant of the given node that actually
// lives in the given workspace
if ($node->getWorkspace()->getName() !== $workspace->getName()) {
$workspaceContext = $this->contextFactory->create(
array_merge(
$node->getContext()->getProperties(),
['workspaceName' => $workspace->getName()]
)
);
$node = $workspaceContext->getNodeByIdentifier($node->getIdentifier());
if ($node === null) {
return;
}
}
$nodeIdentifier = $node->getIdentifier();

if (!array_key_exists($workspace->getName(), $this->workspacesToFlush) || is_array($this->workspacesToFlush[$workspace->getName()]) === false) {
Expand Down

0 comments on commit c99cd8b

Please sign in to comment.