#82056Missing Back Button in DatabaseRecordList (module web_list) despite valid returnUrl
Description
In TYPO3 CMS 7.6 and up a back button should be rendered (in the left doc header button section) of the list module if url parameter returnUrl is set.
Function DatabaseRecordList->getDocHeaderButtons() uses TYPO3\CMS\Backend\Template\Components\ButtonBar to register buttons. it looks like as the back button was forgotten in https://github.com/TYPO3/TYPO3.CMS/commit/79cf7c711e9dea52e39eaa28dd9fde68f10e23c7#diff-42cfb88bd58fd064d043722f827b1cc5.
// Back
if ($this->returnUrl) {
$href = htmlspecialchars(GeneralUtility::linkThisUrl($this->returnUrl, ['id' => $this->id]));
$buttons['back'] = '<a href="' . $href . '" class="typo3-goBack" title="'
. $lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', true) . '">'
. $this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL) . '</a>';
}
… should be replaced with something like …
// Back
if ($this->returnUrl) {
$backButton = $buttonBar->makeLinkButton()
->setHref($this->returnUrl)
->setTitle($lang->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack'))
->setIcon($this->iconFactory->getIcon('actions-view-go-back', Icon::SIZE_SMALL));
$buttonBar->addButton($backButton, ButtonBar::BUTTON_POSITION_LEFT);
}
- 7.6 https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php#L483
- 8.7 https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php#L486
- Master https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php#L486