Bug #85824
closedTrying to delete page with subpages with translations as admin gives error: "Attempt to delete page without permissions"
100%
Updated by Stephan Großberndt over 5 years ago
- Status changed from New to Needs Feedback
Did you go to "User settings" -> "Edit and Advanced functions" and enabled the checkbox at "Recursive Delete(!): Allow ALL subpages to be deleted when deleting a page"? In TYPO3 7.6 and 8.7 this definitely is not a general problem (you chose 7 as TYPO3 version for this bug)..
Updated by Sybille Peters over 5 years ago
- Status changed from Needs Feedback to Closed
@Stephan Yes, I did, but as I have been unable to reproduce this now, I will close.
Updated by Sybille Peters about 4 years ago
- Subject changed from Trying to delete pages with subpages as admin gives error: "Attempt to delete page without permissions" to Trying to delete page with subpages with translations as admin gives error: "Attempt to delete page without permissions"
- Status changed from Closed to New
- TYPO3 Version changed from 7 to 9
I still get this problem and I can reproduce it now: It happens when trying to delete pages with translations pages.
Tested with current 9.5.
Problem occurs if deletion is performed in Backend as system user.
I get the error message: "Attempt to delete page without permissions"
I have set the recursive delete option so that is not the problem.
- delete page without translation: no error
- delete page with translation (and no subpages): no error
- delete page without translation + subpage without translation: no error
- delete page with subpage with translation: ERROR
Updated by Sybille Peters about 4 years ago
I can also reproduce this with latest master (10.4-dev)
Updated by Sybille Peters about 4 years ago
The problem seems to be in the order deletion of pages with translations is performed in DataHandler::deleteRecord()
GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable($table)
->delete($table, ['uid' => (int)$uid]);
$this->deletedRecords[$table][] = (int)$uid;
$this->deleteL10nOverlayRecords($table, $uid);
which results in the original page already being deleted when canDeletePage is called:
DataHandler::canDeletePage($uid)
{
$uid = (int)$uid;
$isTranslatedPage = null;
// If we may at all delete this page
// If this is a page translation, do the check against the perms_* of the default page
// Because it is currently only deleting the translation
$defaultLanguagePageId = $this->getDefaultLanguagePageId($uid);
if ($defaultLanguagePageId !== $uid) {
if ($this->doesRecordExist('pages', (int)$defaultLanguagePageId, 'delete')) {
$isTranslatedPage = true;
} else {
return 'Attempt to delete page without permissions';
}
The problem happens when this function is called for the translated page. In that case, the original page was already deleted (deleted=1) and the function doesRecordExist() will fail.
Updated by Gerrit Code Review about 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63757
Updated by Gerrit Code Review about 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63757
Updated by Gerrit Code Review about 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63757
Updated by Gerrit Code Review about 4 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63757
Updated by Gerrit Code Review about 4 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63757
Updated by Gerrit Code Review about 4 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63757
Updated by Sybille Peters about 4 years ago
- Category changed from Backend API to DataHandler aka TCEmain
Updated by Gerrit Code Review about 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63871
Updated by Sybille Peters about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 02e81aebef92599e9c30b427e127c7f2c7fae9ee.