#110869Error in permission check for sys_file_references when only one language is available
Description
TYPO3-Version: 14.3.6
I have an extbase entity with a “file” column configured in the TCA.
When an editor tries to add something to this file from the backend, they get the following permission error:
checkRecordEditAccess() check failed [ERROR: The “languageField” field named “sys_language_uid” was not found in testing record!]
The new sys_file_reference record that is submitted to that checkRecordEditAccess() function does not contain a sys_language_uid field, which causes the check in line 746 to fail.
It seems like the field is excluded from the row because showIfEmpty (https://docs.typo3.org/permalink/t3tca:confval-select-single-showifempty) is not set. As soon as I set this value in the TCA the field is added to the backend view (though hidden) and editor can save the record because the field is submitted with the default save action.
Reviews 3
History 24
-
Oliver Bartsch commented <span data-processor="relativetime" data-value="2026-10-19T19:19:33+00:00" > 10/19/26, 19:19 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96883 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-19T19:19:48+00:00" > 10/19/26, 19:19 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 97017 <span data-processor="relativetime" data-value="2026-10-22T16:05:51+00:00" > 10/22/26, 16:05 </span>
-
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-22T16:10:10+00:00" > 10/22/26, 16:10 </span>Applied in changeset commit:9d202631f3d3fffaf0ddf52d08b3fa6991fb6440.
Hey,
since v14.2 (#109366) FormEngine hides a language field that offers only one language, unless
showIfEmptyis set, so the field is not submitted. For a new record, DataHandler then takes the first language the editor may use from the site of the page. If the record is stored on a page or folder outside any site configuration (or on root level), there is no site. The language is then set only when the default values are applied, but the access checkcheckRecordEditAccess()runs before that. Non-admin editors therefore got an error, e.g. for new file references.I created a patch, The access check now uses the language the record will be stored with: the configured default (
TCAdefaultsor the TCA default) or, without one, the default language 0. The stored record does not change, and editors without access to that language are still rejected. Records on pages inside a site are not affected.Could you check that the storage folder of your Extbase records is outside a site configuration, and test the patch? Until then, setting
showIfEmptyon the language field remains a valid workaround.Best regards,
Oli