[BUGFIX] TCA selectTree ajax must not calculate display conditions 74/51574/9
authorThorben Nissen <thorben.nissen@kapp-hamburg.de>
Wed, 8 Feb 2017 09:55:41 +0000 (10:55 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 16 Mar 2017 18:48:06 +0000 (19:48 +0100)
commit36f1a701e887bf55e2470f646f5751974de2b0ef
tree725913134b3fd8c05ee5e9e1fa9b767c9ff4f1cc
parentc66f76f78288aaa09f302f51a8b88de0e0161d57
[BUGFIX] TCA selectTree ajax must not calculate display conditions

Opening a record with a FormEngine field type='select' and
renderType='selectTree' just renders boilerplate HTML that triggers
an ajax request to fetch actual tree node data for each field.
The server side ajax controller reduces the TCA to contain only the field
the items should be calculated for to reduce parse times.
In flex form context, if now that tree field has a FIELD display condition,
the standard data group 'tcaDatabaseRecord' which calls 'all' providers fails,
since it can't find a database value of the condition target.

Solution is to create an own data provider group for this 'fetch tree data'
ajax context: This group contains only providers needed by the
'TcaSelectTreeItems' provider and ignores everything else, most importantly
the EvaluateDisplayConditions provider. Leaving out a series of other
not needed data providers gives an additional performance improvement
in this context.

Resolves: #79657
Releases: master
Change-Id: I29bdd659d5f5ee28f8ae017c47df0233abefd6f5
Reviewed-on: https://review.typo3.org/51574
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/FormSelectTreeAjaxController.php
typo3/sysext/backend/Classes/Form/FormDataGroup/TcaSelectTreeAjaxFieldData.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/TcaSelectTreeAjaxFieldDataTest.php [new file with mode: 0644]
typo3/sysext/core/Configuration/DefaultConfiguration.php