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

BUGFIX: use status code 301 in handleShortcutNode when redirecting #5389

Open
wants to merge 1 commit into
base: 8.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Neos.Neos/Classes/Controller/Frontend/NodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ protected function handleShortcutNode(NodeInterface $node)
if ($resolvedNode === null) {
throw new NodeNotFoundException(sprintf('The shortcut node target of node "%s" could not be resolved', $node->getPath()), 1430218730);
} elseif (is_string($resolvedNode)) {
$this->redirectToUri($resolvedNode);
$this->redirectToUri($resolvedNode, 0, 301);
} elseif ($resolvedNode instanceof NodeInterface && $resolvedNode === $node) {
throw new NodeNotFoundException('The requested node does not exist or isn\'t accessible to the current user', 1502793585);
} elseif ($resolvedNode instanceof NodeInterface) {
$this->redirect('show', null, null, ['node' => $resolvedNode]);
$this->redirect('show', null, null, ['node' => $resolvedNode], 0, 301);
} else {
throw new UnresolvableShortcutException(sprintf('The shortcut node target of node "%s" resolves to an unsupported type "%s"', $node->getPath(), is_object($resolvedNode) ? get_class($resolvedNode) : gettype($resolvedNode)), 1430218738);
}
Expand Down