Skip to content
Snippets Groups Projects
Commit bc615d9c authored by Albrecht Köhnlein's avatar Albrecht Köhnlein Committed by Oliver Bartsch
Browse files

[BUGFIX] Set table name even if record could not be found

Set the variable `$linkParts['tableName']` even if the currently linked
record could not be found. The variable is required in later step to
show information, which also should be present for deleted records.

Resolves: #100611
Releases: main, 11.5
Change-Id: I3f5d1e53d8c6889c8907af5ff56c76eb74efa5fc
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78680


Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarAlbrecht Köhnlein <ak@koehnlein.eu>
Reviewed-by: default avatarJörg Bösche <typo3@joergboesche.de>
Tested-by: default avatarAlbrecht Köhnlein <ak@koehnlein.eu>
parent c31e1547
Branches
Tags
No related merge requests found
......@@ -93,10 +93,10 @@ class RecordLinkHandler extends AbstractLinkHandler implements LinkHandlerInterf
if ($record === null) {
$linkParts['title'] = $this->getLanguageService()->getLL('recordNotFound');
} else {
$linkParts['tableName'] = $this->getLanguageService()->sL($GLOBALS['TCA'][$table]['ctrl']['title']);
$linkParts['pid'] = (int)$record['pid'];
$linkParts['title'] = !empty($linkParts['title']) ? $linkParts['title'] : BackendUtility::getRecordTitle($table, $record);
}
$linkParts['tableName'] = $this->getLanguageService()->sL($GLOBALS['TCA'][$table]['ctrl']['title']);
$linkParts['url']['type'] = $linkParts['type'];
$this->linkParts = $linkParts;
......
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