[TYPO3-dev] Is the description of tslib_fe::includeTCA wrong?

Martin Kutschker masi-no at spam-typo3.org
Sun Sep 7 19:06:44 CEST 2008


Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> I just noticed that description of this function says:
> ====================
> Includes full TCA.
> Normally in the frontend only a part of the global $TCA array is loaded,
> for instance the "ctrl" part. Thus it doesn't take up too much memory.
> If you need the FULL TCA available for some reason (like plugins using
> it) you should call this function which will include the FULL TCA.
> Global vars $TCA, $PAGES_TYPES, $LANG_GENERAL_LABELS can/will be affected.
> The flag $this->TCAloaded will make sure that such an inclusion happens
> only once since; If $this->TCAloaded is set, nothing is included.
> ====================
> 
> It appears that this description is historical and does not describe
> what the function does now. Here is what it actually does:
> ====================
> if (!$this->TCAloaded) {
>  $TCA = Array();
>  include (TYPO3_tables_script ? PATH_typo3conf.TYPO3_tables_script :
> PATH_t3lib.'stddb/tables.php');
>    // Extension additions
>  if ($GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE']) {
>   
> include(PATH_typo3conf.$GLOBALS['TYPO3_LOADED_EXT']['_CACHEFILE'].'_ext_tables.php');
> 
>  } else {
>    include(PATH_t3lib.'stddb/load_ext_tables.php');
>  }
>    // ext-script
>  if (TYPO3_extTableDef_script)    {
>    include (PATH_typo3conf.TYPO3_extTableDef_script);
>  }
>  $this->TCAloaded = $TCAloaded;
> }
> ====================
> 
> So, it only loads ext_tables.php from each extension and does not load
> dynamic configuration file (tca.php).
> 
> Can anyone confirm that I am not blind and the description is wrong? If
> yes, I will change it to reflect the real life.

You are right. The descripotion is wrong. The fact that dynamic TCA
doesn't work properly is a long standing issue.

Masi




More information about the TYPO3-dev mailing list