Review main Ready for review Quiet

96306[BUGFIX] Validation of TCA type "check"

Daniel Windloff CR -1 V +1 Normal +220 −9 updated 10/30/26, 22:08

Commit message

During validation of `maximumRecordsCheckedInPid`
for `pid=0`, only records with `pid=0` were
taken into account.

The validation result of `maximumRecordsChecked`
no longer overwrites the validation result of
`maximumRecordsCheckedInPid`.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/06/96306/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/06/96306/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR -1 Needs a vote
    • Oli Bartsch -1
    • Benni Mack +1
  • Verified V +1 Needs a vote
    • Benni Mack +1
    • core-ci +1 CI

Merge conflicts 16

Issues 1

Files 3

Review log 45

  1. Daniel Windloff uploaded patch set 1 10/02/26, 11:21

  2. core-ci voted on patch set 1 V +1 10/02/26, 11:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109921

  3. Benni Mack voted on patch set 1 CR +1 V +1 10/02/26, 13:26

  4. Benni Mack wrote 10/16/26, 07:45

    Topic set to DataHandler
  5. Oli Bartsch commented on patch set 1 CR -1 10/30/26, 22:08

    Unresolved

    This documents the new behaviour as the old bug, which IMO misleads anyone (including me) reading the commit. let's say that pid 0 was treated as "no pid filter" and the global result overwrote the per-pid result. Now pid 0 is a real pid and both limits apply. Please also make the subject imperative, e.g. `[BUGFIX] Enforce both maximumRecordsChecked limits for type check`.

    DataHandler.php:2118 Unresolved

    I don't quite get this comment. Is this really related to the check? Anyways, I wonder if we really need to evaluate both TCA options, in case the first already fails. I think of moving this check directly into line 2112 and only move on with `maximumRecordsChecked` check if passed / not set. So skipping the global check when the per-pid check already reset the value.

    DataHandler.php:2762 Unresolved

    The scalar types and the changed `$pageId` default are more than the fix needs, and only the `null` sentinel is required. This is an `@internal` method, but third-party callers passing a string uid or an explicit `0` could hit a `TypeError` or changed behaviour on a LTS branch. Please keep the parameter types out of the patch (or at least the backport) and change only the default and the `!== null` check.

    CheckboxValidationTest.php:83 Unresolved

    `ForPidZero` and `ForPidNonZero` pass on the base code, and `ForPidNonZero` duplicates the existing InPid test. They add runtime but no regression protection. Please drop them or fold them into `ForPidNonZeroAndZero`. A data provider would also be nicer than five copy-pasted methods.

    CheckboxValidationTest.php:211 Unresolved

    The third record is created on `$pid2`, which already holds a checked record, so `maximumRecordsCheckedInPid=1` rejects it. `$pid3` is created but never used. The test therefore still passes with the `maximumRecordsChecked` check disabled and doesn't guard the global limit. Please create the third record on `$pid3`.

    tx_testdatahandler_element_check.php:8 Unresolved

    The fixture has copy leftovers: ctrl label `title` has no column, `showitem` lists the non-existent `check_maximum_records`, the palette `1` is empty, and the versioningWS and language fields are unused. Let's trim it to the two columns and `rootLevel` -1 that the tests need.