Review main Merged

97572[BUGFIX] Allow tree data providers without database configuration

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

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
    • Georg Ringer +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 10

Review log 1116

  1. Benni Mack uploaded patch set 1 11/12/26, 09:39

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

  3. Benni Mack uploaded patch set 2 V +1 11/12/26, 13:36

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

  5. Benni Mack uploaded patch set 3 V +1 11/12/26, 19:15

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

  7. Benni Mack uploaded patch set 4 V -1 11/12/26, 19:32

  8. core-ci voted on patch set 4 V +1 11/12/26, 19:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114215

  9. Georg Ringer voted on patch set 4 CR +1 V +1 11/12/26, 20:08

  10. Garvin Hicking commented on patch set 4 CR -1 11/12/26, 20:18

    reviewing
  11. Garvin Hicking uploaded patch set 5 CR +1 V +1 11/12/26, 20:39

    remove ifEmpty requirement
  12. core-ci voted on patch set 5 V +1 11/12/26, 20:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114228

  13. Garvin Hicking commented on patch set 5 CR +1 V +1 11/12/26, 20:51

    Reply

    done. adapted that "ifEmpty" is not mandatory to be set so that the tree can be properly constituted without it.
  14. Georg Ringer voted on patch set 5 CR +1 V +1 11/12/26, 21:03

  15. Benni Mack voted on patch set 5 CR +2 V +2 11/12/26, 21:04

  16. Benni Mack merged patch set 6 11/12/26, 21:04