无法确定扩展和插件的默认控制器
The default controller for extension and plugin can not be determined
亲爱的朋友们下午好!全部,我放弃。努力好了,一切都已经成为可能。 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')
);
而且不断犯同样的错误
无法确定扩展 "Fecomments" 和插件 "Pi1" 的默认控制器
我阅读了同样错误的主题,但没有任何帮助。
我已经爬进内核了,发现$configuration['controllerConfiguration']是一个空数组,不知道为什么数据没有到那里。战友们,帮帮我,我不知道该怎么办,老实说! )
首先,对这两个文件使用正确的语法。示例:
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
);
确保命名空间和 class 名称没问题:
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()
{
}
}
清除所有缓存。有时进入 ExtensionManager 和 disable/enable 整个扩展会有所帮助。如果更改 class 名称或更改 tables/localconf 文件,这将刷新 ALL 缓存。
暂时无法使用Mikael提供的解决方案。
外部网站的简短版本,目前处于离线状态:
尝试删除并重新创建页面上的内容元素以删除旧的 flexform 值
亲爱的朋友们下午好!全部,我放弃。努力好了,一切都已经成为可能。 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')
);
而且不断犯同样的错误 无法确定扩展 "Fecomments" 和插件 "Pi1" 的默认控制器
我阅读了同样错误的主题,但没有任何帮助。
我已经爬进内核了,发现$configuration['controllerConfiguration']是一个空数组,不知道为什么数据没有到那里。战友们,帮帮我,我不知道该怎么办,老实说! )
首先,对这两个文件使用正确的语法。示例:
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
);
确保命名空间和 class 名称没问题:
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()
{
}
}
清除所有缓存。有时进入 ExtensionManager 和 disable/enable 整个扩展会有所帮助。如果更改 class 名称或更改 tables/localconf 文件,这将刷新 ALL 缓存。
暂时无法使用Mikael提供的解决方案。
外部网站的简短版本,目前处于离线状态: 尝试删除并重新创建页面上的内容元素以删除旧的 flexform 值