[TYPO3-dev] [TYPO3-mvc] Caching Problem

Xavier Perseguers typo3 at perseguers.ch
Sun Jul 5 22:47:51 CEST 2009


Hi Jiga.,

> Xavier Perseguers wrote:
>> The trick is to add the call to 
>> Tx_Extbase_Utility_Plugin::registerPlugin in file *ext_localconf.php* 
>> (very important) while having call such as t3lib_extMgm::addStaticFile 
>> or t3lib_extMgm::addPiFlexFormValue in file *ext_tables.php*.
> 
> In Inside TYPO3 I could find where in the process the ext_localconf.php 
> files (cached or not) were called, but I didn't find when ext_tables.php 
> files are used.
> 
> Is the process somewhere explained a bit, so simple mortal souls can 
> predict where to put what (there is information in t3lib_extMgm for the 
> functions in that class, but for other actions I'm still at sea)?

I don't know of any documentation explaining this but I'm far for 
knowing all of TYPO3 :-)

ext_tables.php files are cached but are included as part of the process 
in init.php (around line 360).

AFAIK, init.php is only used in BE (and PHP doc mentions this too), 
meaning stuff you put into this file should be for BE purpose only. This 
is true for FlexForm registration and for TS inclusion, as I explained. 
But also for BE modules typically.

ext_localconf.php is loaded too as part of init.php (with inclusion of 
config_default.php) but what is interesting in our case is that it's 
being used in tslib_fe.php, meaning it is used in FE rendering. This is 
why we have to put FE-related stuff in this file.

The important part, if you remember of POP (plain old plugins, a term I 
just found cool, echoing POJO and POCO you might be aware of in other 
programming languages), is that you had to register your plugins 
"twice", once in ext_tables.php to make them accessible in the list of 
plugins in BE, when editing a content element, and once in 
ext_localconf.php with a call to t3lib_extMgm::addPItoST43 to actually 
register their rendering as part of the tt_content COA object.

Extbase's method registerPlugin 
(Tx_Extbase_Utility_Plugin::registerPlugin) does both with only one 
"user"-call, meaning we have to use it in ext_localconf.php (as it is 
used too when initializing BE) and not in ext_tables.php as said in the 
PHP documentation. I hope this will be rewritten soon to prevent other 
for loosing time with this.

HTH

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away




More information about the TYPO3-dev mailing list