“控制器不存在。反射失败。” TYPO3

问题描述 投票:0回答:1

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

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

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

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

typo3 content-management-system typo3-9.x typo3-extensions
1个回答
0
投票

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

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

检查我在此示例中使用的路径在您的情况下是否正确。然后,您需要运行composer dumpautoload

© www.soinside.com 2019 - 2024. All rights reserved.