Skip to content

Commit eb2bca8

Browse files
committed
BUGFIX: Use workspace name from enumerated node during rendering
1 parent efc5811 commit eb2bca8

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Classes/NodeEnumeration/Domain/Dto/EnumeratedNode.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ public function getDimensionsFromContextPath(): array
8080
return $nodePathAndContext['dimensions'];
8181
}
8282

83+
public function getWorkspaceNameFromContextPath(): string
84+
{
85+
$nodePathAndContext = NodePaths::explodeContextPath($this->contextPath);
86+
return $nodePathAndContext['workspaceName'];
87+
}
88+
8389
/**
8490
* @return string
8591
*/
@@ -97,4 +103,4 @@ public function debugString(): string
97103
{
98104
return sprintf('Node %s (%s)', $this->nodeIdentifier, $this->contextPath);
99105
}
100-
}
106+
}

Classes/NodeRendering/NodeRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function fetchRenderableNode(EnumeratedNode $enumeratedNode): ?NodeInt
255255
$site = $this->siteRepository->findOneByNodeName($enumeratedNode->getSiteNodeNameFromContextPath());
256256

257257
$context = $this->contextFactory->create([
258-
'workspaceName' => 'live',
258+
'workspaceName' => $enumeratedNode->getWorkspaceNameFromContextPath(),
259259
'currentSite' => $site,
260260
'currentDomain' => $site->getFirstActiveDomain(),
261261
'dimensions' => $enumeratedNode->getDimensionsFromContextPath()

0 commit comments

Comments
 (0)