#63728Unnecessary calls to BackendUtility->getTCAtypeValue in DataHandler->fillInFieldArray
Description
DataHandler->fillInFieldArray fetches $theTypeString = BackendUtility::getTCAtypeValue for each record but uses this value only if
- is_array($types_fieldConfig)
- !$this->dontProcessTransformations
- isset($fieldArray[$vconf[‘field’]])
- (string) $incomingFieldArray[(‘TRANSFORM’ . $vconf[‘field’])] == ‘RTE’
// Checking for RTE-transformations of fields:
$types_fieldConfig = BackendUtility::getTCAtypes($table, $currentRecord);
$theTypeString = BackendUtility::getTCAtypeValue($table, $currentRecord);
if (is_array($types_fieldConfig)) {
foreach ($types_fieldConfig as $vconf) {
// Write file configuration:
// inserted array_merge($currentRecord,$fieldArray) 170502
$eFile = \TYPO3\CMS\Core\Html\RteHtmlParser::evalWriteFile($vconf['spec']['static_write'], array_merge($currentRecord, $fieldArray));
// RTE transformations:
if (!$this->dontProcessTransformations) {
if (isset($fieldArray[$vconf['field']])) {
// Look for transformation flag:
switch ((string) $incomingFieldArray[('_TRANSFORM_' . $vconf['field'])]) {
case 'RTE':
$RTEsetup = $this->BE_USER->getTSConfig('RTE', BackendUtility::getPagesTSconfig($tscPID));
$thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $table, $vconf['field'], $theTypeString);
Instead of calling this function unconditionally it should only be called if a first RTE with transformations is detected and be cached then.