英文:
Extension not available error when installing Typo3 Extension
问题
我是新手TYPO3用户,已成功安装TYPO3版本9.5。现在,我正在尝试开发自己的扩展,我已经尝试了TYPO3 Kickstart来简化流程。然而,无论我如何尝试,都似乎没有成功,因为每次尝试安装我的扩展时,我都会一直遇到以下错误消息:“扩展myExtensionName不可用”。该扩展位于目录typo3conf/ext/中。此外,我使用网站sitepackagebuilder.com创建了一个扩展,但不幸的是,每当我尝试安装任何扩展时,我仍然会遇到相同的错误消息。
我想使用Composer创建一个扩展。
ext_emconf.php:
<?php
$EM_CONF[$_EXTKEY] = [
'title' => '我的扩展',
'description' => 'Typo3计划任务的命令',
'category' => '插件',
"uploadfolder" => 0,
"clearcacheonload" => true,
'author_email' => '',
'state' => 'alpha',
'createDirs' => '',
'clearCacheOnLoad' => 1,
'version' => '1.0.0',
'autoload' => [
'psr-4' => [
"Foo\\Bar\\" => "Classes/"
]
],
'constraints' => [
'depends' => [
'typo3' => '9.5.0-9.5.99',
],
'conflicts' => [],
'suggests' => [],
],
];
composer.json:
{
"name": "foo/my_extension",
"description": "Typo3计划任务的命令",
"type": "typo3-cms-extension",
"version": "9.5.0",
"prefer-stable": true,
"keywords": [
"TYPO3",
"CMS",
"扩展"
],
"homepage": "https://example.com",
"license": "MIT",
"authors": [
{
"name": "示例",
"email": "test@example.com"
}
],
"require": {
"php": ">=7.2.0",
"typo3/cms-core": "^9.5 || 10.2.0 - 10.4.99",
"typo3/cms-backend": "~8.7.10 || ~9.5.0",
"typo3/cms-extbase": "~8.7.10 || ~9.5.0",
"typo3/cms-scheduler": "~8.7.10 || ~9.5.0"
},
"autoload": {
"psr-4": {
"Foo\\Bar\\": "Classes/"
}
},
"replace": {
"foo/my_extension": "self.version"
}
}
(注意:我只翻译了代码部分,不包括您的问题或其他内容。)
英文:
I'm new to TYPO3 and have successfully installed TYPO3 version 9.5. Now, I'm attempting to develop my own extension, and I've already tried TYPO3 Kickstart to streamline the process. However, none of the attempts seem to have worked, as I consistently encounter the following error message when trying to install my extension: "Extension myExtensionName is not available." The extension is located in the directory typo3conf/ext/. Additionally, I've created a extension using the website sitepackagebuilder.com, but unfortunately, I continue to encounter the same error message whenever I attempt to install any extension.
I want to create a extension with composer.
ext_emconf.php:
<?php
$EM_CONF[$_EXTKEY] = [
'title' => 'My extension',
'description' => 'Typo3 Command for Scheduler',
'category' => 'plugin',
"uploadfolder" => 0,
"clearcacheonload" => true,
'author_email' => '',
'state' => 'alpha',
'createDirs' => '',
'clearCacheOnLoad' => 1,
'version' => '1.0.0',
'autoload' => [
'psr-4' => [
"Foo\\Bar\\": "Classes/"
]
],
'constraints' => [
'depends' => [
'typo3' => '9.5.0-9.5.99',
],
'conflicts' => [],
'suggests' => [],
],
];
composer.json:
{
"name": "foo/my_extension",
"description": "Typo3 Command for Scheduler",
"type": "typo3-cms-extension",
"version": "9.5.0",
"prefer-stable": true,
"keywords": [
"TYPO3",
"CMS",
"Extension"
],
"homepage": "https://example.com",
"license": "MIT",
"authors": [
{
"name": "example",
"email": "test@example.com"
}
],
"require": {
"php": ">=7.2.0",
"typo3/cms-core": "^9.5 || 10.2.0 - 10.4.99",
"typo3/cms-backend": "~8.7.10 || ~9.5.0",
"typo3/cms-extbase": "~8.7.10 || ~9.5.0",
"typo3/cms-scheduler": "~8.7.10 || ~9.5.0"
},
"autoload": {
"psr-4": {
"Foo\\Bar\\": "Classes/"
}
},
"replace": {
"foo/my_extension": "self.version"
}
}
答案1
得分: 0
你的 ext_localconf.php 内容看起来应该放到 ext_emconf.php 中。
英文:
Your ext_localconf.php content looks like it belongs into ext_emconf.php
答案2
得分: 0
当您的扩展不按预期工作,但其他扩展正常时,请比较文件并尝试识别相关的差异。
如果您使用扩展生成器,请尝试创建一个应该正常工作的最小扩展,并与您的扩展进行比较。
请注意您使用的扩展(extensionbuilder
,用于比较的扩展),因为TYPO3 9是一个旧版本,当前的扩展可能不再与其兼容。请使用与TYPO3 9匹配的扩展和文档。
英文:
when your extension doesn't work as expected, but others do, compare the files and try to identify the relevant difference.
If you use the extension builder try to create a minimal extension which should work and compare to yours.
Be careful what extensions you use (extensionbuilder
, extensions to compare) as TYPO3 9 is an old version and current extensions might not working any more with it. Use extensions and documentation matching to TYPO3 9.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论