[TYPO3-dev] enableFields for eID functions

Sebastian Böttger sebastian.boettger at gmail.com
Mon Oct 29 10:15:33 CET 2007


Hi Popy,

the problem is, that scripts using 
GLOBALS['TSFE']->sys_page->enableFields are crashing if calling these 
scripts with a script called with eID.
In that case, there is no $GLOBALS['TSFE'] and $TCA at all.

I copied the includeTCA from class.t3lib_page.php now in my eID script. 
Now it works, but I guess that there are more developers coming across 
this problem.

Regards
Sebastian Böttger




Popy schrieb:
> 2007/10/29, Sebastian Böttger <sebastian.boettger at gmail.com>:
>   
>> Hi,
>>
>> in consideration of the fact that more and more ajax functionality also
>> in the frontend of TYPO3 is coming up, there should be a possibilty to
>> use enableFields also if the frontend is not loaded (because of an eID
>> call).
>>
>> I tried
>>
>> GLOBALS['TSFE']->sys_page->enableFields AND
>> t3lib_pageSelect::enableFields.
>>
>> In the first time, GLOBALS['TSFE'] was not loaded (because of the eID
>> call)
>> In the second I got an TCA table xy not loaded error.
>>
>> Maybe you should move this function to $TYPO3_DB, because you also need
>> it in different frontend engines, called by eID, than the default one.
>> Another possibility would be, to load the TCA Array in
>> t3lib_page.php:938 enableFields
>>
>>         $ctrl = $GLOBALS['TCA'][$table]['ctrl'];
>>         $query='';
>>         if (is_array($ctrl))    {
>>
>> Instead of just throwing an error, why not trying to load the TCA Array
>> first?
>>
>>     
> because ctrl array is always loaded. And eID scripts can work with a
> frontend framework, using page types
>   




More information about the TYPO3-dev mailing list