Issue Bug Resolved

#111214TypeError when creating records whose language is not set outside a site

Benni Mack 10/23/26, 09:38 updated 10/23/26, 10:30

Description

Since #107327 (merged on main), DataHandler::applyDefaultsForFieldArray() expects the page TSconfig TCAdefaults. array as its second argument instead of a page id. The access check added with #110869, DataHandler::addDefaultLanguageForAccessCheck(), still passes the page id.

As a result, creating a new record of a language-aware table without a language value on a page outside any site (e.g. a storage folder, or new file references) fails with:

TypeError: DataHandler::applyDefaultsForFieldArray(): Argument #2 ($pageTsConfigTcaDefaults) must be of type array, int given

FormEngine no longer submits a language field that offers only one language (#109366), so this occurs in normal editing.

Steps to reproduce: run NewRecordOutsideSiteTest on main, or create a new record of a language-aware table on a storage folder outside any site in the backend.
Expected: the record is created, with the access check using the default language as introduced in #110869.

Reviews 1

History 12

  1. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-23T10:30:15+00:00" > 10/23/26, 10:30 </span>

    Applied in changeset commit:429bf552fc5e1aabb3194026b612693ab1ab4b4d.