The default controller for extension and plugin can not be determined

送分小仙女□ 提交于 2020-01-04 17:33:11

问题


Good afternoon, dear friends! All, I give up. Tried well, all that was already possible. TYPO3 7.6.16

ext_tables.php:

<?php

if (!defined('TYPO3_MODE')) die ('Access denied.');

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
    'MyVendor.' . $_EXTKEY,
    'Pi1',
    'The inventory list'
);

ext_localconf.php:

<?php
if (!defined('TYPO3_MODE')) die ('Access denied.');

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'MyVendor.' . $_EXTKEY,
    'Pi1',
    Array ('Comment' => 'list'),
    Array ('Comment' => 'list')
);

And constantly the same mistake The default controller for extension "Fecomments" and plugin "Pi1" can not be determined

I read topics with same error but nothing help me.

I already climbed into the kernel, found out that $configuration ['controllerConfiguration'] is an empty array, I do not know why data does not arrive there. Comrades, help me out, I do not know what to do, honestly! )


回答1:


At first, use the correct syntax for the two files. Examples:

ext_tables.php:

<?php
defined('TYPO3_MODE') || die('Access denied.');

call_user_func(
    function($extKey)
    {
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
            'VENDOR.Extensionkey',
            'Pi1',
            'Extension Display Name'
        );
    },
    $_EXTKEY
);

ext_localconf.php:

<?php
defined('TYPO3_MODE') || die('Access denied.');

call_user_func(
    function($extKey)
    {

        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
            'VENDOR.' . $extKey,
            'Pi1',
            [
                'First' => 'action1, action2'
            ],
            // non-cacheable actions
            [
                'First' => ''
            ]
        );
    },
    $_EXTKEY
);

The make sure the namespace and class name are fine:

typo3conf/ext/extensionkey/Classes/Controller/FirstController.php:

/***
 *
 * This file is part of the "extensionkey" Extension for TYPO3 CMS.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 *  (c) 2017
 *
 ***/
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

/**
 * FilecollectorController
 */
class FirstController extends ActionController
{

    /**
     * action1
     *
     * @return void
     */
    public function action1Action()
    {

    }

    /**
     * action1
     *
     * @return void
     */
    public function action2Action()
    {

    }

}

Clear all caches. Sometimes it will help to go into ExtensionManager and disable/enable the whole extension. In case of changed classnames or changes in the tables/localconf files, this will flush ALL caches.




回答2:


The solution provided by Mikael is not available at the moment.

Short version of the external website, that is currently offline: Try to delete and recreate the content element on your page to delete old flexform values



来源:https://stackoverflow.com/questions/43556533/the-default-controller-for-extension-and-plugin-can-not-be-determined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!