Actions
Bug #84247
openTCA label_userfunc called for every record in current page/folder
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2018-03-13
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
We searched all the changelogs but the wasn't an info regarding the internal handling of label_userfunc.
We are using a label_userfunc for a normal TCA table. Creating a new record within a folder which already contains thousands of records of this type will take 30+ seconds until the TCE Form will be rendered. Debugging it, we saw that the userfunc is called for every record within the current page.
We upgrading from 6.2 to 7 LTS / 8 LTS. In Typo3 6.2 the function seems to be called only one time, so there is no delay while opening the TCE Form.
return array( 'ctrl' => array( 'title' => 'LLL:EXT:ffh_topics/Resources/Private/Language/locallang_db.xml:tx_ffhtopics_domain_model_content', 'label' => 'text_headline', 'label_userFunc' => 'RTFFH\\FfhTopics\\Userfuncs\\Tca->contentTitle', ... ) );
The userfunc is very simple. It only fetches the record and does some string operations
public function contentTitle(&$parameters, $parentObject) { $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($parameters['table'], $parameters['row']['uid']); ... }
Actions