Bug #81405
closedNew pages are places at same level instead of under, when using the ContextMenu.
100%
Description
When one creates a new page using the ContextMenu they are placed at the same level as the page you clicked on, instead of under. This means that none admins can't create new pages when clicking on the root page.
Current behaviour, when add a new page on Page 1 as Admin- Root
- Page2
- Page 3
=>
- Root
- Page 1
- Page 2
- Page new
As none admin you get "Sorry, you didn't have proper permissions to perform this change."
Expected behaviour:- Root
- Page 1
- Page 2
=>
- Root
- Page 1
- Page 2
- Page new
Files
Updated by Riccardo De Contardi almost 7 years ago
- Category set to Backend User Interface
- Status changed from New to Needs Feedback
Hi, I wonder if this issue could be related https://forge.typo3.org/issues/72011.
Could you add a step-by-step guide about how to reproduce this issue, with some screenshots e.g. where you click exactly?
Could you also check with the latest master? Thank you!
Updated by Riccardo De Contardi over 6 years ago
- Status changed from Needs Feedback to New
[Update]¶
#72011 is not related.
The issue is reproducible with 8.7.8 and 9.0.0-dev (latest master) with the following steps:
1) use a non-admin be user that can access the "home" page of your pagetree
2) click on home and bring up the context menu
3) use the "new" item (NOT the "more options > 'create new' wizard"!!)
Result:¶
Sorry, you didn't have proper permissions to perform this change. No record creation permission for user 2 on page root node 1437745221
Explanation: "new" appends the page below the one where you are, at the same level. if you do that on the "home" page of your site, it throws the error because the editor can't access the root below (id=0).
The issue reporter suggests to modify the "new" behavior from "create a new page below" to "create a new page inside" the page from where you opened the menu.
I guess that this would be a breaking change, as it is a completely different behavior.
I wonder if a possible solution could be to remove the "new" command and just use the 'create new' wizard, that lets you choose the position, and only inside the page where you opened it.
Updated by Riccardo De Contardi about 6 years ago
- Related to Bug #85260: Can not create new page via context menu on root page as editor added
Updated by Philip Burggraf over 5 years ago
We ran into the same issue on version 9.5.4.
Updated by Sybille Peters over 5 years ago
- File newpage.png newpage.png added
I think the problem is the change of behavior and user interface between TYPO3 7 and 8 of creation of new pages. It's not really a bug, but I don't think current behavior is intuitively usable and should be improved. The solution for the editors could be to use the "Create new wizard" or drag and drop with "Create new pages" in the top (But again, how should they know? You shouldn't have to look in the documentation for something that simple, IMHO).
I tested this for 7, 8 and 9:
TYPO3 7¶
Page Actions -> New : opens page wizard where you can select position ("Select a position for the new page")
TYPO3 8¶
- "New" (submenu "Page Actions" is omitted, which is good): directly creates page (under current page, not as subpage)
- "More Options" > "Create new wizard" : opens page wizard
- or use drag'n drop with "Create new pages" on the top.
TYPO3 9¶
same as 8
It appears, for TYPO3 8, the behavior was changed, so that "New" directly creates a page and creates it under current page (on same level). The page wizard is now more hidden. I think people will run into this problem often. Actually, I think you would rather expect the page to be created as subpage of current page and not on same level.
Updated by Riccardo De Contardi over 5 years ago
I add here for reference the comment https://forge.typo3.org/issues/85260#note-1 (closed as duplicate) to keep track of it.
Guido Schmechel wrote:
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
Updated by Gerrit Code Review almost 3 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/+/72093
Updated by Gerrit Code Review almost 3 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/+/72093
Updated by Oliver Bartsch almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ae11be4653cb8078e0bdaaa66f25fc0fa93db5f9.
Updated by Gerrit Code Review almost 3 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72097
Updated by Oliver Bartsch almost 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset 6e319afb504fed6c613547754b9cc07bdcfd7109.
Updated by Benni Mack almost 2 years ago
- Status changed from Resolved to Closed