Bug #60987
closedTCA|Extension loading order
0%
Description
I wrote an extension (extension A) which modifies, in its ext_tables.php, TCA of other extensions to add some columns. Those extensions are selected dynamically by TypoScript.
In case of "news" extension, its TCA is generally loaded before my extension, so there is no problem for modifying it.
However, in case of an custom extension (extension B), I don't know if this one is loaded before or after my extension A. If it's before, there is no problem by using :
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
$table,
$tempColumns
);
If it's loaded after, the TCA for $table is generally reset in extension B/Configuration/TCA/$table.php :
$GLOBALS['TCA'][$table] = array(...);
So $GLOBALS['TCA'][$table]['columns'], setted by extension A, is removed.
I would like to know if it's possible to provide a module which allows to set the order's extensions loading. Another solution would be to reinitialize GeneralUtility::loadTCA($table).
And I won't set 'dependencies' or 'suggest' in extension A, as it should be able to modify TCA's extensions of TER's extensions and customs ones and as I would like to publish extension A in TER.
Could be related to #36414.
Updated by Markus Klein over 10 years ago
Hi!
There is no API to modify the loading order. This wouldn't help you anyway, because you need to do some magic in ext_localconf or so, which happens after the loading order is defined.
I would suggest to simply use the $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'] hook.
See typo3/sysext/core/Classes/Core/Bootstrap.php line 943
Updated by Markus Klein over 10 years ago
- Status changed from New to Needs Feedback
Updated by Guy Couronné over 10 years ago
Thank you, I didn't know this hook was present. I will use it.
This "bug" is resolved by this information.
Updated by Markus Klein over 10 years ago
- Status changed from Needs Feedback to Rejected