Move addStaticFile() method call to proper place

Calling within ext_tables.php is bad practice and breaks TYPO3 extension
compatibility check.

Relates: #10077
This commit is contained in:
Daniel Siepmann 2023-01-09 13:14:15 +01:00
parent b99f19b79d
commit 34ac9cbbe3
3 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,11 @@
<?php
defined('TYPO3') or die();
(static function (string $extensionKey, string $tableName) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extensionKey,
'Configuration/TypoScript',
'Events'
);
})('events', 'sys_template');

View file

@ -39,6 +39,9 @@ Fixes
* Support import of png images from Destination One.
* Do not break TYPO3 v11.5 extension compatibility check.
The ``addStaticFile()`` method has to be called from ``Configuration/TCA/Overrides/`` instead of ``ext_tables.php`` as this might break frontend.
Tasks
-----

View file

@ -4,8 +4,6 @@ defined('TYPO3') || die('Access denied.');
call_user_func(
function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('events', 'Configuration/TypoScript', 'Events');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_events_domain_model_event', 'EXT:events/Resources/Private/Language/locallang_csh_tx_events_domain_model_event.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_ddevents_domain_model_event');