Review 14.3 Merged

97592[BUGFIX] Allow tree data providers without database configuration

Benni Mack CR +2 V +2 Hard +401 −39 updated 11/12/26, 21:28

Commit message

A selectTree field with a custom "treeConfig.dataProvider" had to
set "foreign_table" and "childrenField" or "parentField", even if the
data provider does not read records from the database, because
TreeDataProviderFactory configured every provider like the
DatabaseTreeDataProvider. A data provider extending
AbstractTableConfigurationTreeDataProvider without own constructor
even failed with a fatal error. In addition, FormEngine removed all
stored values of such a field, as they are no records of a
"foreign_table", so saving the record emptied the field.

The factory now applies the database specific options and their
validation only to instances of DatabaseTreeDataProvider, handles
data provider classes without constructor, and the stored values of
fields with such a data provider are kept.

The field "select_tree_8" in EXT:styleguide shows a tree from a
data provider without database relation.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 10

Review log 57

  1. Benni Mack commented on patch set 1 11/12/26, 21:04

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/styleguide/Configuration/TCA/tx_styleguide_elements_select.php
  2. Benni Mack uploaded patch set 2 11/12/26, 21:12

  3. Benni Mack marked it ready for review 11/12/26, 21:12

  4. core-ci voted on patch set 1 V -1 11/12/26, 21:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114239

  5. core-ci voted on patch set 2 V +1 11/12/26, 21:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114241

  6. Benni Mack voted on patch set 2 CR +2 V +2 11/12/26, 21:28

  7. Benni Mack merged patch set 3 11/12/26, 21:28