Skip to content

Commit

Permalink
TASK: Remove half-baked solution of session independent preview's
Browse files Browse the repository at this point in the history
Otherwise, this feature would only work for this one page, successive links will currently not have that query param added - the linking service still needs to learn this, but we delay this for another time.
  • Loading branch information
mhsdesign committed Sep 15, 2023
1 parent e2c6f5e commit 0463da9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Neos.Neos/Classes/Controller/Frontend/NodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class NodeController extends ActionController

/**
* @param string $node Legacy name for backwards compatibility of route components
* @param string $renderingModeName Name of the user interface mode to use
* @throws NodeNotFoundException
* @throws \Neos\Flow\Mvc\Exception\StopActionException
* @throws \Neos\Flow\Mvc\Exception\UnsupportedRequestTypeException
Expand All @@ -126,13 +125,10 @@ class NodeController extends ActionController
* with unsafe requests from widgets or plugins that are rendered on the node
* - For those the CSRF token is validated on the sub-request, so it is safe to be skipped here
*/
public function previewAction(string $node, string $renderingModeName = null): void
public function previewAction(string $node): void
{
if (is_null($renderingModeName)) {
$renderingMode = $this->renderingModeService->findByCurrentUser();
} else {
$renderingMode = $this->renderingModeService->findByName($renderingModeName);
}
// @todo add $renderingModeName as parameter and append it for successive links again as get parameter to node uris
$renderingMode = $this->renderingModeService->findByCurrentUser();

$visibilityConstraints = VisibilityConstraints::frontend();
if ($this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess')) {
Expand Down

0 comments on commit 0463da9

Please sign in to comment.