Skip to content
Snippets Groups Projects
Commit eb436b19 authored by Patrick Broens's avatar Patrick Broens Committed by Georg Ringer
Browse files

[BUGFIX] Fix thrown exception in history

When a logged in backend user is entering the history/undo functionality
for a certain page, which contains a deleted one, the backend user
authentication will throw an error.

This is due to the fact the pid field is not taken into account when
fetching the pages to check if they are deleted. This pid field will be
used to calculate the page access, but is now done with the value null.

This patch will add the pid field when fetching the subpages which will
be checked if they are deleted.

Resolves: #90963
Releases: master, 9.5
Change-Id: I1b78d4a71fea35b5d55a1d8989e586f01e7d9280
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64088


Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent b0b324ed
No related merge requests found
......@@ -513,7 +513,8 @@ class RecordHistory
$isDeletedPage = false;
if (isset($GLOBALS['TCA']['pages']['ctrl']['delete'])) {
$deletedField = $GLOBALS['TCA']['pages']['ctrl']['delete'];
$pageRecord = BackendUtility::getRecord('pages', $pageId, $deletedField, '', false);
$fields = 'pid,' . $deletedField;
$pageRecord = BackendUtility::getRecord('pages', $pageId, $fields, '', false);
$isDeletedPage = (bool)$pageRecord[$deletedField];
}
if ($isDeletedPage) {
......
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