#111259Non-admin editors cannot publish new records on root level (pid=0) in a workspace, e.g. sys_file_metadata placeholders
Description
Environment
- TYPO3 13.4.36 and main (v15-dev, commit be4defe7999, 2026-10-23)
- Non-admin backend user, member of a workspace (via a group); the group has sys_file_metadata in tables_modify on main, not on 13.4.36 (it makes no difference for this check)
- A site with a second language is needed to create translations of file metadata in the backend
Steps to reproduce
- Create a workspace and make a non-admin backend user a member of it.
- In that workspace, create new sys_file_metadata records (translations of file metadata). They are stored as new placeholders (t3ver_state = 1, pid = 0).
- Publish them in the Workspaces module as that user.
Expected
The records are published. sys_file_metadata has ctrl.security.ignoreRootLevelRestriction = true, and #106569 restored that rule for editing and translating pid=0 records.
Actual
Nothing is published. sys_log contains, per record, table sys_file_metadata, action 8, error 1: “You cannot publish a record you do not have edit and show permissions for”. Admins can publish.
Note: publishing a changed copy of an existing record (t3ver_state = 0) works. Only new placeholders (t3ver_state = 1) are affected, because only they reach the failing check.
Cause (verified on 13.4.36 and main)
EXT:workspaces/Classes/Hook/DataHandlerHook.php, version_swap(), line 294 in 13.4.36 (line 346 in main), for new placeholder records:
if (!$dataHandler->hasPageContextPermission('pages', Permission::PAGE_SHOW, $pageRecord)) {
For pid = 0 the page record is VirtualRecord::RootPage. DataHandler::hasPageContextPermission() then returns the ignoreRootLevelRestriction setting of the table passed in, here ‘pages’, which is false. So non-admins fail the check. The branch for existing records further down passes $table.
Fix (tested on 13.4.36 and main)
Pass $table instead of ‘pages’ in that call.
13.4.36: a non-admin published two sys_file_metadata placeholders; sys_log shows “Record … was published” (action 8, error 0).
main: as a non-admin (user 3, workspace 1), a new sys_file_metadata translation (placeholder, t3ver_state = 1, pid = 0) failed with the error above unpatched and was published (errorLog empty, action 8, error 0) after the change. The same result was confirmed again in the backend after adding a second language.
I’ve included a patch for a casual look at it.
Reviews 3
Related issues 2
Files 1
History 38
-
Gerrit Code Review pushed patch set 1 for main to change 97178 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-27T20:26:08+00:00" > 10/27/26, 20:26 </span> -
Garvin Hicking changed Related to #106569 <span data-processor="relativetime" data-value="2026-10-27T20:27:52+00:00" > 10/27/26, 20:27 </span>
-
Garvin Hicking changed Related to #107432 <span data-processor="relativetime" data-value="2026-10-27T20:30:46+00:00" > 10/27/26, 20:30 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 97178 <span data-processor="relativetime" data-value="2026-10-27T20:35:13+00:00" > 10/27/26, 20:35 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 97178 <span data-processor="relativetime" data-value="2026-10-30T11:44:54+00:00" > 10/30/26, 11:44 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97238 <span data-processor="relativetime" data-value="2026-10-30T13:10:39+00:00" > 10/30/26, 13:10 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 97239 <span data-processor="relativetime" data-value="2026-10-30T13:11:02+00:00" > 10/30/26, 13:11 </span>
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-30T13:35:19+00:00" > 10/30/26, 13:35 </span>
Applied in changeset commit:d8f28f5bbfe36cb715d1bd1f162b520bc7ee090e.