Posts Tagged ‘ TYPO3 6

TYPO3 6 and earlier version – Custom TCA for different TYPO3 versions

Related to the this post, where I had solved a problem with TCA and the t3editor, there appears another problem.
The t3editor in my extension works now fine with TYPO3 6 – but TYPO3 4.x we have destroyed the functionality.

But with a small ‘TCA hack’ we are able to fix it. Just append the next PHP code after the TCA, that uses the t3editor, like this:

if(isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'])) {
  if((float)$GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version']<6) {
      $TCA['tx_ftm_domain_model_templatemarker']['columns']['marker_typo_script']['config']['wizards']['t3editorTypoScript']['userFunc'] = 
        'EXT:t3editor/classes/class.tx_t3editor_tceforms_wizard.php:tx_t3editor_tceforms_wizard->main';
  }
}

In the first line we make sure that the variable of the compat version is defined. After that we check if the TYPO3 version is lower that TYPO3 6. If it so, we overwrite the TCA field, where the userFunc is defined and makes the classes-c lowercase.

If you have some optimizations or tipps, feel free to comment this post 🙂

TYPO3 6 – How to uninstall an extension manually

Often it happens, that you install a new extension into your TYPO3 6, but the extension isn’t already compatible with this new TYPO3 version.
In worst case your TYPO3 throws an 500 internal server error on each request – and now?

No problem, just uninstall the extension manually by the next few steps (in these case the gridelements v1.4.0):

1. Open the LocalConfiguration.php file which is located in the typo3conf directory. Here you have to remove the following entries:

	'EXT' => array(
		'extConf' => array(
			... -> this gridelements entry
			'gridelements' => 'a:1:{s:20:"additionalStylesheet";s:0:"";}',
			... <- end
	'EXT' => array(
		'extListArray' => array(
			... -> and this second gridelements entry
			'gridelements',
			... <- end

2. In the next step we have to clear the cached configuration files. In order to do this in TYPO3 6 you just can delete the Cache directory, that is located in the typo3temp directory.
3. Finally you’re able to remove the extension as usual by using the extensionmanager.

TYPO3 6 with integrated t3editor in own extbase extension

In a current project of mine, the Fluid Template Manager, I use the t3editor in the developed backend module. Thanks of the great post of the typo3blogger I was able to integrate them easily in TYPO3 4.7.x.
But while preparing our ftm Extension for TYPO3 6.1 there happens a small error.
The page with the t3editor isn’t loading, because there happens a 500 internal server error.

The solution is easy.
By the conventions of the TYPO3-Extension folder structure, the folder classes must be written uppercase first. The corrected TCA-Snippet looks now like that:

'template_code' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:ftm/Resources/Private/Language/locallang_db.xml:tx_ftm_domain_model_templatefluid.template_code',
    'config' => array(
        'type' => 'text',
        'cols' => 112,
        'rows' => 36,
        'eval' => 'trim',
        'wizards' => array(
            't3editorHtml' => array(
                'enableByTypeConfig' => 1,
                'type' => 'userFunc',
                'userFunc' => 'EXT:t3editor/Classes/class.tx_t3editor_tceforms_wizard.php:tx_t3editor_tceforms_wizard->main',
                'params' => array(
                    'format' => 'html',
                ),
            ),
        ),
    ),
),

By the way, i found out that the cols and rows entries now worked as they should. 🙂

Note: Related to this problem there is another post here, that deals with the integration in different TYPO3 versions.

TYPO3 6 Debugging of a 500 internal server error

In order to debug a TYPO3 6.1 Website, where only a white page is displayed (as result of a 500 internal server error), you can enable the displayErrors in a similar way then in earlier versions of TYPO 3.

Just edit the LocalConfiguration.php which is located within the typo3conf directory and add the following entry:

	...
	'SYS' => array(
		...
		'displayErrors' => '1',
	),
);
?>

But, don’t forget to remove this entry after debugging 😉