#101879Decouple TYPO3\CMS\Core\Tree\TableConfiguration\TreeDataProviderFactory from Database/DatabaseTreeDataProvider
Description
## Story
As a developer i want to be able to use a database independent treeConfig/DataProvider in TCA/FlexForms select fields of renderType selectTree.
## Details
ATM the TreeDataProviderFactory is tightly coupled to the internal implementation of the DatabaseTreeDataProvider.
It checks for ‘foreign_table’, ‘childrenField’ and ‘parentField’ while this should be done by the specific TreeDataProvider itself.
With the removal of the “internal_type” check this behavior forces you to set thoose fields even if your treeDataProvide is not even using a database see:
https://github.com/TYPO3/typo3/commit/6f557ac5aae1b44f882dfbe09d60c2f68ce3534d#diff-2a75aeb556ea1fbf95b8ff85c45804ae0141c922fe2b1561362fa91555ce0c40L69
## Example
Lets say you want to provide TreeData from remote Source e.g. a Webservice.
In this case you need to provide dummy foreign_table, ChildrenField and ParentField as well as adding the corresponding setters to your TreeDataProvider even though they are not used at all.
## Solution
Leave the TCA Checks to the Dataprovider itself.
Remove the tight coupling to the DatabaseTreeProvider:
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php#L71
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php#L73
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php#L80
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php#L112
A treeConfig with a custom TreeDataProvider is not “invalid” if “foreign_table” or the child/Parent field is missing :)
Reviews 2
History 310
-
Garvin Hicking commented and changed category status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-07-31T10:36:15+00:00" > 07/31/24, 10:36 </span> -
Gerrit Code Review pushed patch set 1 for main to change 97572 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2026-11-12T09:39:08+00:00" > 11/12/26, 09:39 </span> -
Gerrit Code Review pushed patch set 2 for main to change 97572 <span data-processor="relativetime" data-value="2026-11-12T13:36:26+00:00" > 11/12/26, 13:36 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 97572 <span data-processor="relativetime" data-value="2026-11-12T19:15:18+00:00" > 11/12/26, 19:15 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 97572 <span data-processor="relativetime" data-value="2026-11-12T19:32:30+00:00" > 11/12/26, 19:32 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 97572 <span data-processor="relativetime" data-value="2026-11-12T20:39:42+00:00" > 11/12/26, 20:39 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97592 <span data-processor="relativetime" data-value="2026-11-12T21:04:12+00:00" > 11/12/26, 21:04 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-12T21:10:13+00:00" > 11/12/26, 21:10 </span>Applied in changeset commit:3828f81fba53c55f100a47f2d7c1fa61d8b83a68.
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 97592 status
ResolvedUnder Review <span data-processor="relativetime" data-value="2026-11-12T21:12:06+00:00" > 11/12/26, 21:12 </span> -
Benni Mack commented and changed status
Under ReviewResolved <span data-processor="relativetime" data-value="2026-11-12T21:35:12+00:00" > 11/12/26, 21:35 </span>Applied in changeset commit:8593504a79a2bc1266aa193be9a43e15f3802a52.
Thanks for the report. You seem to have a good idea about how your proposal could go, would you be interested in providing your idea as a patch?