[TYPO3-dev] sys_categories: API conflicts with core

Caspar Stuebs caspar at gosign.de
Wed Sep 3 13:34:00 CEST 2014


Hi André,

the function ExtensionManagementUtility::makeCategorizable() changes the
TCA. Due to that it won't work in ext_localconf.php files, because the TCA
is generated after the include of these files.

Kind Regards
Caspar


2014-09-03 12:27 GMT+02:00 André Spindler <typo3 at andre-spindler.de>:

> Hello,
>
> I wan't to use the system categories in a new extension but found some
> conflict here:
> Categories are added by calling
> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable()
> But where must this be called?
>
> The API reference
> (
> http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Categories/Inde
> x.html#categories-activating) says:
> The call to makeCategorizable() must be located in an extension's
> ext_tables.php file or (since TYPO3 CMS 6.2.1) in a file from the
> Configuration/TCA/Overrides folder.
>
> Looking into the Core I found there:
>         /**
>          * Makes a table categorizable by adding value into the category
> registry.
>          * FOR USE IN ext_localconf.php FILES or files in
> Configuration/TCA/Overrides/*.php Use the latter to benefit from TCA
> caching!
>          *
>
> So, what is right? Ext_tables.php (like API says) or ext_localconf.php
> (like
> stated in Core)?
> Or if both solutions work, what shoulb be preferred?
> Ans someone should edit the API documantation then or the comment in code
> :-)
>
> I shouold mention that I the table I want the categories tob e added
> belongs
> to my own extension, it's no core table
>
> Thanks,
> André
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>

-- 
-- 

Gosign media. GmbH | We web ideas.
Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
Telefon 040-609 40 79-0

Handelsregister AG HH HRB 112197 | Geschäftsführung Bert Gogolin
Greenpeace energy: Gosign läuft mit ehrlichem Strom und Gas.
GLS Bank: Gosign wirtschaftet mit Gewissen. 



More information about the TYPO3-dev mailing list