0
votes

I created my third extension with the extension builder but this one won't install itself properly. I get the error:

The default controller for extension "NtImpressions" and plugin "Gallery" can not be determined. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.

I did not modify anything in the extension files. The Plugin is completly generated by the extension builder. This is the ext_localconf.php

<?php
if (!defined('TYPO3_MODE')) {
    die ('Access denied.');
}    
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'Xxx.' . $_EXTKEY,
    'Gallery',
    array(
        'Galerie' => 'list, show',          
    ),
    array(
        'Galerie' => '',

    )
);    
?>

And the ext_tables.php

<?php
if (!defined('TYPO3_MODE')) {
    die ('Access denied.');
}    
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
    $_EXTKEY,
    'Gallery',
    'Galerie'
);    
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Impressionen');    
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_ntimpressions_domain_model_galerie', 'EXT:nt_impressions/Resources/Private/Language/locallang_csh_tx_ntimpressions_domain_model_galerie.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_ntimpressions_domain_model_galerie');
$TCA['tx_ntimpressions_domain_model_galerie'] = array(
    'ctrl' => array(
        'title' => 'LLL:EXT:nt_impressions/Resources/Private/Language/locallang_db.xlf:tx_ntimpressions_domain_model_galerie',
        'label' => 'bezeichnung',
        'tstamp' => 'tstamp',
        'crdate' => 'crdate',
        'cruser_id' => 'cruser_id',
        'dividers2tabs' => TRUE,    
        'versioningWS' => 2,
        'versioning_followPages' => TRUE,
        'origUid' => 't3_origuid',
        'languageField' => 'sys_language_uid',
        'transOrigPointerField' => 'l10n_parent',
        'transOrigDiffSourceField' => 'l10n_diffsource',
        'delete' => 'deleted',
        'enablecolumns' => array(
            'disabled' => 'hidden',
            'starttime' => 'starttime',
            'endtime' => 'endtime',
        ),
        'searchFields' => 'bezeichnung,beschreibung,bilder,bilder_beschreibung,',
        'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Galerie.php',
        'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_ntimpressions_domain_model_galerie.gif'
    ),
);    
?>
1
Try to remove the 'Xxx.' in the line with $_EXTKEY. If that does not help, try to use an empty array as "non-cachable actions"-array. Both ideas are only shots into the blue.Jost
I tried both with the same result... \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( $_EXTKEY, 'Gallery', array( 'Galerie' => 'list, show', ), array( ) );qualle

1 Answers

2
votes

I guess the namespace is not set correct and TYPO3 is unable to determine your controller GalerieController->listAction.

The first part of the configurePlugin registers the namespace in TYPO3 6.0, so you need to add this namespace to all classes. The Namespace is parsed to the path where the file with the class can be found. This is the equivalent to the old syntax.

Old syntax:

class Tx_YourExtension_Controller_YourController {
    //...
}

is now

<?php
namespace YourVendor\YourExtension\Controller; 

class YourController {
    //...
}

So following configuration

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Xxx.' . $_EXTKEY,
...

registers Xxx as Vendor, so all your classes need to be in that namespace

<?php
namespace Xxx\Gallery\Controller

class GalleryController {
    // ...
}

Where "Gallary" is you extension key in upper camel case.