Issue Bug Resolved

#110705DataHandler applies page TSconfig TCAdefaults to records on other pages

Stefan Bürk 09/15/26, 07:25 updated 09/15/26, 13:05

Description

When a single DataHandler instance creates new records on different pages, the TCAdefaults of the page TSconfig of one page are also applied to all records which are created afterwards, even on pages which do not define these defaults.

Steps to reproduce

  1. Add page TSconfig to page A: TCAdefaults.tt_content.header_layout = 3
  2. Page B, a sibling of page A, has no TCAdefaults for tt_content.
  3. Process one datamap which creates a content element on page A first and another content element on page B afterwards.

The content element on page B is stored with header_layout 3 instead of the TCA default 0.

The same happens for every table and field, for example when several pages are created in one request, when records are imported or when an extension creates records on several pages with one DataHandler instance. Records processed before the record on page A are not affected, the result depends on the order of the datamap.

Cause

DataHandler::applyDefaultsForFieldArray merges the page TSconfig TCAdefaults of each new record into the instance wide property DataHandler::$defaultValues using setDefaultsFromUserTS, and the merged values are never reset. This exists since page TSconfig TCAdefaults are respected by the DataHandler (#89211) and has been verified on 12.4, 13.4, 14.3 and main.

Expected behaviour

TCAdefaults of page TSconfig are only applied to records which are created on the page, or below the page, defining them.

Related

  1. refactors the default value handling of the DataHandler for main and also solves this. This issue covers the isolated fix, which can be backported to the maintained branches.

Reviews 4

History 18

  1. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-15T13:05:10+00:00" > 09/15/26, 13:05 </span>

    Applied in changeset commit:01206207b0ff9c8c3fb76d819bfbc6f4707647fc.