[TYPO3-english] XClass in Typo3 6.2

PIT Solutions typo3 at pitsolutions.com
Tue Mar 11 11:00:19 CET 2014


Hi Alex,

I checked your code and I've implemented that in my extension like this;

$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['tx_srfeuserregister_display']['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_display'] 
= 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>']['className'] 
= '<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_display'] = 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


More information about the TYPO3-english mailing list