Issue Bug Closed

#88856TCA config.treeConfig.appearance.nonSelectableLevels must be set to 0 if config.treeConfig.rootUid is defined

Georg Tiefenbrunn 07/29/19, 21:02 updated 09/29/26, 15:26

Description

In TYPO3 CMS 9.5.x you have to explicitly set config.treeConfig.appearance.nonSelectableLevels=0 to enable the default behavior described in https://docs.typo3.org/m/typo3/reference-tca/9.5/en-us/ColumnsConfig/Type/Select.html#treeconfig

Steps to reproduce:

  1. Create some multi level category tree
  2. Apply Page TSconfig to a category field, e.g. TCEFORM.tt_content.categories.config.treeConfig.rootUid = 1

Excepted behavior: By default the root node (which is “0”) cannot be selected (see TCA reference)

Current state: The root node (category uid=1) is selectable unless you explicitly set TCEFORM.tt_content.categories.config.treeConfig.appearance.nonSelectableLevels=0

Seems related to #54494

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php#L79

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented <span data-processor="relativetime" data-value="2026-09-29T15:26:28+00:00" > 09/29/26, 15:26 </span>

    Thanks for the report. I had a look at this against the current main branch.

    treeConfig.rootUid does not exist anymore: it was superseded by treeConfig.startingPoints in v11.4 (see #95037) and removed in v12. The behaviour described here is still the same with startingPoints, but it is intended:

    • No starting point: the tree root is the virtual node “0”, nonSelectableLevels defaults to 0, so the root cannot be selected.
    • Exactly one starting point: this record itself is rendered as the tree root. As it is a real record (e.g. a category), it is selectable by default.
    • Several starting points: a virtual node “0” is rendered as root again to hold them, so level 0 is not selectable by default.

    This logic lives in TreeDataProviderFactory and was already there for rootUid, where the non-selectable level list was explicitly reset to an empty value.

    If the starting point itself should not be selectable, set the level explicitly, which is exactly what the option is meant for:

    TCEFORM.tt_content.categories.config.treeConfig {
      startingPoints = 1
      appearance.nonSelectableLevels = 0
    }

    As this works as designed, I’m closing the issue. If the TCA reference is unclear about the single starting point case, that should be clarified in the documentation (TYPO3CMS-Reference-TCA) rather than changed in the core. Feel free to reopen if you see a different behaviour in a current version.