M2.4.x版本安装于windows机中报Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes

作者:admi... 点击数: 0 收藏到会员中心
最后编辑时间: 2021-02-24 20:20

In PatchApplier.php line 170:

  Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme. Original exception message: Wrong file

In Gd2.php line 64:

  Wrong file


02202124_02.jpg

付费内容限时免费中...

解决方法:

打开 

vendor\magento\framework\Image\Adapter\GD2.php

大约95行

 private function validateURLScheme(string $filename) : bool
    {
        $allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
        $url = parse_url($filename);
        if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes)) {
            return false;
        }

        return true;
    }

修改为

private function validateURLScheme(string $filename) 
{
    if(!file_exists($filename)) { // if file not exist
        $allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
        $url = parse_url($filename);
        if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes)) {
            return false;
        }
    }

    return true;
}


内容说明:
如您需要转载本文请保留以下信息是对作者发文的支持与尊重:

M2.4.x版本安装于windows机中报Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes 来源于 https://www.magentola.com/news-read-206.html
上一篇:M2.x为什么MAGENTOLA团队不建议使用Varnish
下一篇:M2.4.x版本安装报于This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP
相关内容
产品推荐