Extension not available error when installing Typo3 Extension

410 Views Asked by At

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": "[email protected]"
    }
  ],
  "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"
  }
}
2

There are 2 best solutions below

0
Bernd Wilke πφ On BEST ANSWER

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.

0
Wolffc On

Your ext_localconf.php content looks like it belongs into ext_emconf.php