Bug #85260

Can not create new page via context menu on root page as editor

Added by Christoph Lehmann 10 months ago. Updated 10 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Pagetree
Target version:
-
Start date:
2018-06-14
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

As an editor i have all permissions on a page which is marked as root page. I can not create a new page via context menu (right klick), but it works via drag&drop.

Bildschirmfoto 2018-06-14 um 13.19.50.png View (14.6 KB) Christoph Lehmann, 2018-06-14 13:25

Bildschirmfoto 2018-06-14 um 13.25.38.png View (6.5 KB) Christoph Lehmann, 2018-06-14 13:27


Related issues

Related to TYPO3 Core - Bug #81405: New pages are places at same level instead of under, when using the ContextMenu. New 2017-06-01

History

#1 Updated by Guido Schmechel 10 months ago

Can reproduce it with 9.4.dev

master\typo3\sysext\backend\Classes\Form\FormDataProvider\DatabaseUserPermissionCheck.php function addData()
if (is_array($result['parentPageRow']))

$result['parentPageRow'] is null if editor creates a page at root. Admin user has a separate check and returns simple true

master\typo3\sysext\backend\Classes\Form\FormDataProvider\DatabaseParentPageRow.php
This class should return correctly null if root level is accessed.

Maybe its okay to use $result['neighborRow'] if $result['parentPageRow'] is null.

After that the saving throws this exception:
1: Attempt to insert a record on page '[root-level]' (0) from table 'pages' without permissions. Or non-existing page.

master\typo3\sysext\core\Classes\DataHandling\DataHandler.php
checkRecordInsertAccess() get a negative value via resolveSortingAndPidForNewRecord()

So a simple abs() does the trick

#2 Updated by Gerrit Code Review 10 months 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/57497

#3 Updated by Gerrit Code Review 10 months 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/57497

#4 Updated by Riccardo De Contardi 10 months ago

Is this the same issue? #81405

#5 Updated by Riccardo De Contardi 10 months ago

  • Related to Bug #81405: New pages are places at same level instead of under, when using the ContextMenu. added

#6 Updated by Susanne Moog about 2 months ago

  • Category changed from Backend User Interface to Pagetree
  • Status changed from Under Review to New

Patch has been abandoned.

#7 Updated by Sybille Peters 10 days ago

So you want to create a page as subpage of current page?

But if you use "New", the page is created (or tried to create) on same level as current page (under current page). I think this is currently not a bug, but it is not great either.

If you want to create a page as a subpage use the context menu: "More options" > "Create new wizard".

I think this is actually a duplicate of #81405 and should be closed.

Also available in: Atom PDF