Commit 792ca7c9 authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Benni Mack
Browse files

[BUGFIX] Use correct page id key for resolving shortcut targets

The correct key is "uid" rather than "id".
This got changed by accident in #94663 (9d7e4758).

Resolves: #95056
Related: #94663
Releases: master
Change-Id: I405de598bd7019aef56a53923a1ea7753fc65bc2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70843

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Helmut Hummel's avatarHelmut Hummel <typo3@helhum.io>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Helmut Hummel's avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 693cc79b
......@@ -419,7 +419,7 @@ class PageLayoutController
}
$message = htmlspecialchars($message);
if ($targetPage !== [] && $shortcutMode !== PageRepository::SHORTCUT_MODE_RANDOM_SUBPAGE) {
$linkToPid = $this->uriBuilder->buildUriFromRoute($this->moduleName, ['id' => $targetPage['id']]);
$linkToPid = $this->uriBuilder->buildUriFromRoute($this->moduleName, ['id' => $targetPage['uid']]);
$path = BackendUtility::getRecordPath($targetPage['uid'], $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW), 1000);
$linkedPath = '<a href="' . htmlspecialchars((string)$linkToPid) . '">' . htmlspecialchars($path) . '</a>';
$message .= sprintf(htmlspecialchars($lang->getLL('pageIsInternalLinkMessage')), $linkedPath);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment