[TYPO3-dev] cObj->IMAGE in BE doesn't work

Dmitry Dulepov dmitry at typo3.org
Thu Oct 12 09:26:10 CEST 2006


Hi!

Georg Ringer wrote:
> I want to use a cObj in a BE-module and I only get the following error if I 
> use instance: Fatal error: Call to a member function on a non-object in 
> /typo3_src-4.0.2/typo3/sysext/cms/tslib/class.tslib_content.php on line 4603
> 
> I only get the error with an cObj->IMAGE, with cObj->TEXT everything is 
> fine.

The problem is that you are trying to use strictly FE objects outside of 
FE context.

> Some looks at the core:
> tslib_content.php #4603: $theImage = 
> $GLOBALS['TSFE']->tmpl->getFileName($file);
> => Problem because $GLOBALS['TSFE']->tmpl->getFileName() doesn't work

Yes, because TS template object is initialized only for FE.

What exactly do you want to do? May be there are better ways?
-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)




More information about the TYPO3-dev mailing list