[TYPO3-dev] sys_categories: API conflicts with core

François Suter fsu-lists at cobweb.ch
Wed Sep 3 14:55:02 CEST 2014


Hi André,

> To have a file /Configuration/TCA/table_name.php and also
> /Configuration/TCA/Overrides/table_name.php for just one table? But
> as /Configuration/TCA/table_name.php just returns the array, it is
> not possible to add the call to the catagory-api in THIS file. Ist
> hat right?

For a custom table of your own, you should not need an override file. 
You can put everything in /Configuration/TCA/table_name.php. The latter 
is expected to return an array, but you can execute other PHP code 
before returning, for example calling 
ExtensionManagementUtility::makeCategorizable(). However I haven't 
tested this scenario, so I'm not sure if it works fine.

Recently I stumbled on an issue when calling 
ExtensionManagementUtility::makeCategorizable() from a 
/Configuration/TCA/Overrides file, in that the categories field is 
there, but the Category Registry is not filled properly (it is probably 
not initialized properly when the TCA is loaded from cache). As I'm not 
exactly sure how this all works, I haven't dug into that yet. As a work 
around I placed my call ExtensionManagementUtility::makeCategorizable() 
in the extension's ext_tables.php file, which I recommend for now.

Cheers

-- 

Francois Suter

Work: Cobweb Development Sarl - http://www.cobweb.ch

TYPO3: Help the project! - http://typo3.org/contribute/

Appreciate my work? Support me -
http://www.monpetitcoin.com/en/francois/support-me/




More information about the TYPO3-dev mailing list