"Controller does not exist. Reflection failed."当然
"Controller does not exist. Reflection failed." TYPO3
我在 TYPO3 (v 9.5.12) 中开发我自己的扩展程序,当我通过管理工具点击我的扩展程序时,弹出一条错误消息:
日志显示以下错误消息:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1278450972:
Class Secsign\Secsign\Controller\SecsignController does not exist.
Reflection failed.
| TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException thrown in file
C:\xampp\htdocs\Typo9\public\typo3\sysext\extbase\Classes\Reflection\ReflectionService.php
in line 363. Requested URL:
http://localhost/Typo9/public/typo3/index.php?route=%%2Ftools%%2FSecsignSecsignbe%%2F&token=--AnonymizedToken--
我的 composer.json 文件如下所示。
{
"name": "secsign/secsign",
"type": "typo3-cms-extension",
"description": "This extension allows users to authenticate using their smart phone running the SecSign App.",
"authors": [
{
"name": "SecSign Technologies Inc.",
"role": "Developer"
}
],
"require": {
"typo3/cms-core": "^9.5"
},
"autoload": {
"psr-4": {
"Secsign\Secsign\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"Secsign\Secsign\Tests\": "Tests/"
}
}
}
我不明白这里的问题。我怎样才能让它工作?
如果您正在开发扩展,您可能没有通过 Composer 安装它。这意味着扩展的 composer.json 未加载。您必须将自动加载信息添加到您的根 composer.json(C:\xampp\htdocs\Typo9 中的那个),直到您的扩展完成并通过 composer 安装。
"autoload": {
"psr-4": {
"Secsign\Secsign\": "public/typo3conf/ext/secsign/Classes/"
}
},
检查我在此示例中使用的路径是否适合您的情况。然后你需要 运行 composer dumpautoload
.
我在 TYPO3 (v 9.5.12) 中开发我自己的扩展程序,当我通过管理工具点击我的扩展程序时,弹出一条错误消息:
日志显示以下错误消息:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1278450972:
Class Secsign\Secsign\Controller\SecsignController does not exist.
Reflection failed.
| TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException thrown in file
C:\xampp\htdocs\Typo9\public\typo3\sysext\extbase\Classes\Reflection\ReflectionService.php
in line 363. Requested URL:
http://localhost/Typo9/public/typo3/index.php?route=%%2Ftools%%2FSecsignSecsignbe%%2F&token=--AnonymizedToken--
我的 composer.json 文件如下所示。
{
"name": "secsign/secsign",
"type": "typo3-cms-extension",
"description": "This extension allows users to authenticate using their smart phone running the SecSign App.",
"authors": [
{
"name": "SecSign Technologies Inc.",
"role": "Developer"
}
],
"require": {
"typo3/cms-core": "^9.5"
},
"autoload": {
"psr-4": {
"Secsign\Secsign\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"Secsign\Secsign\Tests\": "Tests/"
}
}
}
我不明白这里的问题。我怎样才能让它工作?
如果您正在开发扩展,您可能没有通过 Composer 安装它。这意味着扩展的 composer.json 未加载。您必须将自动加载信息添加到您的根 composer.json(C:\xampp\htdocs\Typo9 中的那个),直到您的扩展完成并通过 composer 安装。
"autoload": {
"psr-4": {
"Secsign\Secsign\": "public/typo3conf/ext/secsign/Classes/"
}
},
检查我在此示例中使用的路径是否适合您的情况。然后你需要 运行 composer dumpautoload
.