Magento安装遇到问题以及解决方案

Magento安装遇到问题以及解决方案

解决Magento安装完成后,管理页面为空,前站页面显示不正确。

f001.png

请运行以下命令来解决问题:

sudo chmod -R 0777 var/ pub/ generated/
rm -rf pub/static/* var/* generated/code/*
php bin/magento cache:flush
php bin/magento set:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
sudo chmod -R 0777 var/ pub/ generated/


解决Magento安装完成后无法进入后台管理页面:

Image

修改方法如下:

/vendor/magento/framework/View/Element/Template/File/Validator.php:113

code

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    foreach ($directories as $directory) {
        if (0 === strpos($this->fileDriver->getRealPath($path), $directory)) {
            return true;
        }
    }
    return false;
}

to replace

protected function isPathInDirectories($path, $directories)
    {
        $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
        if (!is_array($directories)) {
            $directories = (array)$directories;
        }
        foreach ($directories as $directory) {
            if (0 === strpos($realPath, $directory)) {
                return true;
            }
        }
        return false;
    }

If You can't find out the (/vendor/magento/framework/) folder in magento 2.2.7 - 2.3.3 . Then You can check it here:

#lib\internal\Magento\Framework\View\Element\Template\File\Validator.php

Required for comment verification
2020年3月25日 01:21 - swgebMic  
overdosed on viagra tombstone what happens if a woman takes viagra <a href=" https://pharm-usa-official.com/# #">generic viagra available </a> penis getting hard on viagra generic viagra starting today viagra for women effect how much viagra is safe to take at one time [url=https://pharm-usa-official.com/# #]viagra side effects [/url] viagra connect viagra sample pack https://scottadlhochtraveller.com/2020/03/09/philippines-singles-8/?unapproved=938&moderation-hash=d274e9ac46db93792b5a7fcd413498bf#comment-938 https://aleasdeals.com/2020/03/13/free-magazines-for-taking-brief-online-survey/?unapproved=100&moderation-hash=ee1531f8f95a5e74d21fd67682a2b687#comment-100 https://gwadarandcpec.com/2020/03/07/giappone-2019-2/?unapproved=512&moderation-hash=0a82ae7cd29979b4d86e6f346dbf096e#comment-512 https://shopifiq.com/5-veggie-juice-recipes-to-start-your-day-with-2/?unapproved=34648&moderation-hash=d2c6a0827b56ede087c05ed1628b6883#comment-34648 https://linkbold.com/get-your-blog-the-attention-it-deserves/?unapproved=137&moderation-hash=23b38f6f09de03505e9308ede3f34458#comment-137
回复
2020年3月18日 12:41 - yafdoMic  
cheap viagra viagra 100mg <a href="http://essay-shop.com #">viagra buy </a> generic viagra viagra pills ufiouas0209sss buy viagra generic viagra [url=http://ok-berezka.ru/ #]buy viagra [/url] cheap viagra buy viagra
回复
2020年1月6日 05:37 - Drozdovabode  
http://bit.ly/2QcvpAG - buy an essay cheap We bring you the evolution of quality and the revolution of satisfaction. Here, you can order anonymously an academic paper written from scratch. You can also request professional editing. Or go for proofreading. It’s really your call. And the prices… They are beyond sweet! OUR QUALITY & SERVICES EVOLVE, BUT OUR PRICES STAY AFFORDABLE http://bit.ly/2QowGF1 - report writing service For partners http://bit.ly/2Qebt05 [url=http://natal-general-calc.catlink.eu/general-discussion/848164886/paper-writing-services-for-college-students]paper writing services for college students[/url] [url=https://www.asteriskguru.com/tutorials/budgetone_100_grandstream_hardphone.html?name=TimonaevNop&email=an.to.nsi.do.r.33.25%40gmail.com&comment=http%3A%2F%2Fbit.ly%2F35eCYuX%20-%20pay%20to%20write%20papers%20%0D%0A%20%0D%0ANeed%20help%20with%20your%20assignment%3F%20%0D%0AGet%20an%20expert%20academic%20writing%20assistance%21%20We%20can%20write%20any%20paper%20on%20any%20subject%20within%20the%20tightest%20deadline.%20%0D%0Ahttp%3A%2F%2Fbit.ly%2F2QcvpAG%20-%20order%20a%20paper%0D%0A%20%0D%0A%20%0D%0A%20%0D%0AFor%20partners%20%20http%3A%2F%2Fbit.ly%2F2Qebt05%20%0D%0A%20%0D%0A%5Burl%3Dhttps%3A%2F%2Fdrifloon.diarynote.jp%2F201312240840371658%2F%5Dhelp%20with%20college%20papers%5B%2Furl%5D%20%5Burl%3Dhttp%3A%2F%2Fkool-bunker-staples.catlink.eu%2Fgeneral-discussion%2F848020560%2Fbuy-custom-paper%5Dbuy%20custom%20paper%5B%2Furl%5D%20%5Burl%3Dhttp%3A%2F%2Fdaily-banana-realised.catlink.eu%2Fgeneral-discussion%2F848018106%2Fpay-someone-to-write-paper%5Dpay%20someone%20to%20write%20paper%5B%2Furl%5D%20%200fe6399%20&img_verification=8125&err=1#cmt]buy cheap papers[/url] [url=http://suzanne-weave-wikipedia.catlink.eu/general-discussion/848324039/write-my-persuasive-paper]write my persuasive paper[/url] 8d81344
回复
2020年1月6日 04:23 - lilliangi1  
College Girls Porn Pics http://sextoysforboys.relayblog.com/?brenda free first time audition porn animal porn videos views nicole brazzell porn adam dexter porn star porn mmm100
回复