[Typo3-dev] cObj Error when using hook
Thomas Mammitzsch
typo at pure.kicks-ass.net
Thu Dec 22 11:45:46 CET 2005
Dmitry Dulepov schrieb:
> Thomas Mammitzsch wrote:
>
>>i try to use a hook within css_styled_content in typo 3.8.1 with my
>>extension. I want to use an own render_uploads() function (in fact i use
>>a copy of the original, only some html-rendering will be changed). but
>>if i use the _unchanged_ copy of this function in my ext i get this error:
>>
>>Fatal error: Call to a member function on a non-object in
>>D:\xampp\xampp\eclipse\workspace\typo3.8.1\typo3conf\ext\user_fileupload\pi1\class.user_fileupload_pi1.php
>>on line 52
>>
>>i commented out this lines and the error message disappeared:
>>
>>line 52:
>>$fileList = $this->cObj->stdWrap($this->cObj->data['media'],$lConf);
>>
>>line 132:
>>$out = $this->cObj->stdWrap($out, $conf['stdWrap.']);
>>
>>i really don't have an idea, why this doesn't work. maybe you can help me?
>
>
> You do not have cObj member in your class right? :) this is why error
> appears. You probably can use $GLOBALS['TSFE']->newCObj() to get cObj.
>
> Dmitry.
hi,
i didn't know that i have to create an instance of Cobj first.
css_styled_content also doesn't do this. i thougt this would be done
outside of my extension....
i tried it and put it in my function, but it still doesn't work and
throws the same error as before.
bye, Thomas
More information about the TYPO3-dev
mailing list