首页 > 解决方案 > 调用未定义的方法 craft\helpers\Stringy::langSpecificCharsArray() Craft 3

问题描述

嗨,我在部署后遇到 Craft CMS 的问题,如果尝试登录 /admin/login,我会遇到错误,我尝试删除供应商并再次安装作曲家,但还是一样。如果手动移动有效并且在部署后,我如何解决这个问题,我让作曲家更新,得到这个错误。

    Call to undefined method craft\helpers\Stringy::langSpecificCharsArray()

1. in /var/www/developion_website/vendor/craftcms/cms/src/helpers/Stringy.phpat line 32
23242526272829303132333435363738394041 
    /**
     * Public wrapper for [[langSpecificCharsArray()]].
     *
     * @param string $language Language of the source string
     * @return array An array of replacements
     */

    public static function getLangSpecificCharsArray(string $language = 'en'): array
    {
        return static::langSpecificCharsArray($language);
    }

    // Public Methods
    // =========================================================================

    /**
     * Public wrapper for [[charsArray()]].
     *
     * @return array

这是我的 composer.json

    {
  "require": {
    "craftcms/ckeditor": "1.0.0-beta.2",
    "craftcms/cms": "3.2.10",
    "ether/seo": "3.6.2",
    "vlucas/phpdotenv": "^2.4.0",
    "xpertbot/craft-wheelform": "2.2.4"
  },
  "autoload": {
    "psr-4": {
      "modules\\": "modules/"
    }
  },
  "config": {
    "sort-packages": true,
    "optimize-autoloader": true,
    "platform": {
      "php": "7.0"
    }
  },
  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
  }
}

标签: craftcms

解决方案


我也无法让 Composer 正确更新,不得不使用 Craft 的 CLI 工具绕过它,以获取纠正此问题的次要版本补丁。

在终端中,运行以下命令会碰到我的锁定文件并解决了问题:

php craft update all

推荐阅读