Bug #84247
openTCA label_userfunc called for every record in current page/folder
0%
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']); ... }
Updated by Webadmin no-lastname-given over 6 years ago
- Related to Bug #81036: TCA l18n_parent is processed for sys_language_uid 0 added
Updated by Webadmin no-lastname-given over 6 years ago
- Related to Bug #82730: Opening record in backend painfully slow with foreign table and large main table added
Updated by Webadmin no-lastname-given over 6 years ago
When I change the l10n_parent to .pid=-1 it's fast again...
'l10n_parent' => array( 'displayCond' => 'FIELD:sys_language_uid:>:0', 'exclude' => 1, 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', 'config' => array( 'type' => 'select', 'items' => array( array('', 0), ), 'foreign_table' => 'tx_ffhtopics_domain_model_content', 'foreign_table_where' => 'AND tx_ffhtopics_domain_model_content.pid=-1 AND tx_ffhtopics_domain_model_content.sys_language_uid IN (-1,0)', ), ),
Updated by Marc Hirdes almost 3 years ago
This still exists in TYPO3 10.4.23 with PHP 7.4.
The problem is the l10n_parent.
We set the type to passthrough and it worked for us
'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'passthrough', ], ],
Now the user can't select another l10n_parent, but for an IRRE element this should be ok.
Updated by Timo Borer about 1 year ago
- TYPO3 Version changed from 8 to 12
- PHP Version changed from 7.2 to 8.2
This still exists in TYPO3 12.4.5 with PHP 8.2.
Updated by Gerrit Code Review almost 1 year ago
- Status changed from New to Under Review
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 12 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 12 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 6 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 6 months ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 4 months ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871
Updated by Gerrit Code Review 4 months ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81871