“控制器不存在。反思失败。” TYPO3 [英] "Controller does not exist. Reflection failed." TYPO3

查看:98
本文介绍了“控制器不存在。反思失败。” TYPO3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在TYPO3(v 9.5.12)中开发自己的扩展程序,当我通过管理工具单击扩展程序时,会弹出错误消息:

I am working on my own extension in TYPO3 (v 9.5.12) and when I click on my extension via Admin Tools, an error message pops up:

日志读取以下错误消息:

The log reads following error message:

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文件看起来像这样。

My composer.json file looks like this.

{
    "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/"
        }
    }
}

我不明白这里的问题。我该如何使用它?

I do not understand the problem here. How can I get this to work?

推荐答案

如果您正在使用扩展程序,则可能没有通过composer安装它。这意味着未加载扩展程序的composer.json。您必须将自动加载信息添加到根composer.json(位于C:\xampp\htdocs\Typo9中),直到扩展完成并通过composer安装为止。

If you're working on the extension you probably didn't install it through composer. That means the extension's composer.json isn't loaded. You'll have to add the autoload information to your root composer.json (the one in C:\xampp\htdocs\Typo9) until your extension is done and installed through composer.

    "autoload": {
        "psr-4": {
            "Secsign\\Secsign\\": "public/typo3conf/ext/secsign/Classes/"
        }
    },

检查您在本例中使用的路径是否正确。然后,您需要运行 composer dumpautoload

Check if the path I used in this example is correct in your case. Then you'll need to run composer dumpautoload.

这篇关于“控制器不存在。反思失败。” TYPO3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆