[TYPO3-english] XClass in Typo3 6.2

Christian Reiter cr at cNOSPAMxd.de
Tue Mar 11 13:57:02 CET 2014


Hi,

What this means is probably that GeneralUtility::makeInstance is getting 
your classname (which is good and means your Xclass registration works) 
but can't instantiate the class because it's not included.

Go back and check your autoload.php, whether the path is perfectly correct.
In your first code you qouted a generic example code for "extname"

   $extensionPath = \TYPO3\CMS\Core\Utility
   \ExtensionManagementUtility::extPath('extname');

   return array( 'ux_tx_srfeuserregister_display' =>
   $extensionPath.'class.ux_tx_srfeuserregister_display.php', )

Unless the extension that contains the Xclass really is called "extname" 
this literal quote would be wrong...

Best regards,

Christian




Am 11.03.2014 11:19, schrieb PIT Solutions:
> Hi Markus,
>
> Sorry. Still the same error displayed.
>
> in my extensions ext_localconf.php file
>
> $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_display']['className'] = 'ux_tx_srfeuserregister_display';
>
>
> and the fatal error is displayed.
>
> Thanks
>     Arun Chandran
>
>
> ________________________________
>   From: Markus Klein <klein.t3 at mfc-linz.at>
> To: 'TYPO3 English' <typo3-english at lists.typo3.org>
> Sent: Tuesday, March 11, 2014 3:42 PM
> Subject: Re: [TYPO3-english] XClass in Typo3 6.2
>
>
> Try to clean your typo3temp/Cache/ folder.
>
> Kind regards
> Markus
>
> ------------------------------------------------------------
> Markus Klein
> TYPO3 CMS Active Contributors Team Member
>
>> -----Original Message-----
>> From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-
>> bounces at lists.typo3.org] On Behalf Of PIT Solutions
>> Sent: Tuesday, March 11, 2014 11:00 AM
>> To: TYPO3 English
>> Subject: Re: [TYPO3-english] XClass in Typo3 6.2
>>
>> Hi Alex,
>>
>> I checked your code and I've implemented that in my extension like this;
>>
>> $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_displ
>> ay']['className'] = 'ux_tx_srfeuserregister_display';
>>
>>
>> Now I got an error in frontend with the classname
>> 'ux_tx_srfeuserregister_display' not found;
>>
>> Fatal error:  Class 'ux_tx_srfeuserregister_display' not found in
>> /typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4289
>>
>>
>> Can you help me to solve this?
>>
>> Thanks,
>> Arun Chandran
>>
>> ________________________________
>>    From: Alexander Stehlik <alexander.stehlik at gmail.com>
>> To: typo3-english at lists.typo3.org
>> Sent: Tuesday, March 11, 2014 2:49 PM
>> Subject: Re: [TYPO3-english] XClass in Typo3 6.2
>>
>>
>>
>> Hi,
>>
>> as far as I know the "old" XCLASS concept does not work any more in
>> TYPO3 6.2.
>>
>> What should work though is the configuration you posted first:
>>
>> $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_displ
>> ay']
>> = array( 'className' => 'ux_tx_srfeuserregister_display');
>>
>> But this will only work if the class is instantiated correctly with
>> GeneralUtility::makeInstance() in sr_feuser_register.
>>
>> I'm using this configuration quite often and it works:
>>
>> $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['<OriginalClass>']['classNa
>> me']
>> = '<NewClassName>'.
>>
>> You need to clear all caches to make sure sure that the configuration
>> gets active, including system caches which you need to enable with TSConfig:
>>
>> options.clearCache.system = 1
>>
>> Kind regards,
>> Alex
>>
>>
>> Am 11.03.2014 07:37, schrieb PIT Solutions:
>>> Hi All,
>>>
>>> Now I am using Typo3 6.2beta5 version and in that website I need to
>> include an xclass for the extension sr_feuser_regsiter. The extension is in
>> "pi_base" and I tried the following methods to include xclasses, but not
>> working anymore;
>>>
>>> -> localconf.php
>>>
>>>       $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_di
>> splay'] = array( 'className' => 'ux_tx_srfeuserregister_display');
>>>
>>> -> ext_autoload.php
>>>
>>>        $extensionPath =
>> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('extname')
>> ;
>>>        return array( 'ux_tx_srfeuserregister_display' =>
>> $extensionPath.'class.ux_tx_srfeuserregister_display.php', );
>>>
>>> Does anybody knows the solution ?
>>>
>>> Thanks in advance,
>>> Arun Chandran
>>>
>>
>>
>> --
>> Alexander Stehlik
>> alexander.stehlik at gmail.com
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>



More information about the TYPO3-english mailing list