首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TYPO3 CMS 8.7.27:在null上调用成员函数getPackagePath()

TYPO3 CMS 8.7.27:在null上调用成员函数getPackagePath()
EN

Stack Overflow用户
提问于 2019-06-25 17:15:49
回答 4查看 1.4K关注 0票数 1

在typo3 CMS 8.7.27中安装扩展后,我得到以下错误..似乎ExtensionManagementUtility无法加载ah_contentapi。

这是我的根目录下的composer.json文件(/var/www/html/typo3),用于加载我的扩展名:

代码语言:javascript
复制
{
   "repositories":[
      {
         "type":"composer",
         "url":"https://composer.typo3.org/"
      },
      {
         "type":"package",
         "package":{
            "name":"Bm/ah-content-api",
            "version":"0.0.1",
            "type":"typo3-cms-extension",
            "source":{
               "url":"https://user@bitbucket.org/company/ah_config_typo3.git",
               "type":"git",
               "reference":"master"
            }
         }
      },
      {
         "type":"package",
         "package":{
            "name":"Bm/ah-contentelements",
            "version":"0.0.1",
            "type":"typo3-cms-extension",
            "source":{
               "url":"https://user@bitbucket.org/company/ah_contentelements_typo3.git",
               "type":"git",
               "reference":"master"
            }
         }
      }
   ],
   "name":"typo3/cms-base-distribution",
   "description":"TYPO3 CMS Base Distribution",
   "license":"GPL-2.0-or-later",
   "require":{
      "helhum/typo3-console":"^4.9.3 || ^5.2",
      "typo3/cms-about":"^8.7.10",
      "typo3/cms-belog":"^8.7.10",
      "typo3/cms-beuser":"^8.7.10",
      "typo3/cms-context-help":"^8.7.10",
      "typo3/cms-documentation":"^8.7.10",
      "typo3/cms-felogin":"^8.7.10",
      "typo3/cms-fluid-styled-content":"^8.7.10",
      "typo3/cms-form":"^8.7.10",
      "typo3/cms-func":"^8.7.10",
      "typo3/cms-impexp":"^8.7.10",
      "typo3/cms-info":"^8.7.10",
      "typo3/cms-info-pagetsconfig":"^8.7.10",
      "typo3/cms-rte-ckeditor":"^8.7.10",
      "typo3/cms-setup":"^8.7.10",
      "typo3/cms-sys-note":"^8.7.10",
      "typo3/cms-t3editor":"^8.7.10",
      "typo3/cms-tstemplate":"^8.7.10",
      "typo3/cms-viewpage":"^8.7.10",
      "typo3/cms-wizard-crpages":"^8.7.10",
      "typo3/cms-wizard-sortpages":"^8.7.10",
      "typo3/cms":"^8.7",
      "dmitryd/typo3-realurl":"2.*",
      "GridElementsTeam/Gridelements":"8.2.*",
      "clickstorm/cs_seo":"3.*",
      "Bm/ah-content-api":"0.0.1",
      "Bm/ah-contentelements":"0.0.1"
   },
   "scripts":{
      "typo3-cms-scripts":[
         "typo3cms install:fixfolderstructure",
         "typo3cms install:generatepackagestates"
      ],
      "post-autoload-dump":[
         "@typo3-cms-scripts"
      ]
   },
   "extra":{
      "typo3/cms":{
         "web-dir":"public"
      },
      "helhum/typo3-console":{
         "comment":"This option is not needed ay more for helhum/typo3-console 5.x",
         "install-extension-dummy":false
      }
   },
   "autoload":{
      "psr-4":{
         "Bm\\AhContentelements\\":"public/typo3conf/ext/ah_contentelements/Classes",
         "Bm\\AhContentapi\\":"public/typo3conf/ext/ah_content_api/Classes"
      }
   }
}

我已在以下位置清除安装工具中的缓存: 1. -> important actions -> clear all cache 2. -> Clean -> clean typo3temp/ folder

来自composer.lock的文章:

代码语言:javascript
复制
{
    "_readme": [
        "This file locks the dependencies of your project to a known state",
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
        "This file is @generated automatically"
    ],
    "content-hash": "954afd2318d54ec9b1dd0e4d7f9b445b",
    "packages": [
        {
            "name": "Bm/ah-content-api",
            "version": "0.0.1",
            "source": {
                "type": "git",
                "url": "https://stevenhippovibe@bitbucket.org/hippovibe/ah_config_typo3.git",
                "reference": "master"
            },
            "type": "typo3-cms-extension"
        },
        {
            "name": "Bm/ah-contentelements",
            "version": "0.0.1",
            "source": {
                "type": "git",
                "url": "https://stevenhippovibe@bitbucket.org/stevenhippovibe/ah_contentelements_typo3.git",
                "reference": "master"
            },
            "type": "typo3-cms-extension"
        },
EN

回答 4

Stack Overflow用户

发布于 2020-03-04 17:43:57

typo3conf/ext/<folder_name>下的扩展文件夹名称与系统某些地方使用的扩展密钥不匹配时(例如,在TypoScript中使用EXT:your_extension_key/...语法),就会出现此错误。

更改文件夹名称为我修复了类似的问题。

票数 1
EN

Stack Overflow用户

发布于 2021-12-01 19:43:43

检查PHP版本并尝试将其从7.4更改为7.3。

我曾经在一个应该与PHP 7.4兼容的扩展中遇到过这个问题,但在现实生活中却并非如此。这为我解决了这个问题。

票数 1
EN

Stack Overflow用户

发布于 2019-06-25 18:23:49

这里的问题是:

  • 您是如何更新到8.7.27的(执行了哪个composer命令)
  • 您的composer.lock是什么样子的?
  • 您是否使用TYPO3控制台或任何其他特殊的composer插件/命令行界面命令,例如生成composer
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56750604

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档