Project

General

Profile

Bug #93370

Updated by Markus Klein about 3 years ago

Scenario (TYPO3 Version 10.4.12): 
 A non-admin user changes the slug of a page, saves the page, the popup appears to revert the change or revert the redirect only. 
 Click on revert, then the notification "Revert successful - All created redirects have been reverted." appears. But the redirect still exists and is not removed. 

 This is what I found debugging this behaviour: 
 in @\TYPO3\CMS\Redirects\Controller\RecordHistoryRollbackController::rollBackCorrelation@ \TYPO3\CMS\Redirects\Controller\RecordHistoryRollbackController::rollBackCorrelation a Changelog of the sys_redirect record is retrieved. 
 But as all redirects are stored in PID 0, the check for @pageAccess@ pageAccess in @\TYPO3\CMS\Backend\History\RecordHistory::getHistoryDataForRecord@ \TYPO3\CMS\Backend\History\RecordHistory::getHistoryDataForRecord (l. 367, @$this->hasPageAccess@) $this->hasPageAccess) fails, so an empty changelog is returned and a "false positive" notification is shown that all redirects are reverted. 
 (@$id@ ($id passed to @\TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess@ \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess is @0@, 0, so it returns @false@ false for all non-admins). 

Back