将magento2.4系统切换为开发者模式,接着再切换回生产模式。 报错

已解决136 浏览M2交流区magento2.4, 生产模式

将magento2.4系统切换为开发者模式,接着再切换回生产模式。 报错

文章目录[隐藏]

从Linux生产环境拷贝了源码,本地Windows部署完查看系统模式为生产模式,此时网站正常。

不做任何代码修改,直接将系统切换为开发者模式,接着再切换回生产模式。

报错如下

网页:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

日志:

[2021-03-29 01:40:25] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'yotpo_bottomline' element cannot be added as child to 'product.info.main', because the latter doesn't exist [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'paypal.partner.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'bml.right.logo' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'yotpo_bottomline' tries to reorder itself towards 'product.info.addto', but their parents are different: 'product.info.main' and '' respectively. [] []
[2021-03-29 01:40:25] main.INFO: Broken reference: the 'compare-link-wrapper' tries to reorder itself towards 'top.search', but their parents are different: 'header-wrapper' and 'ecg.header' respectively. [] []
问题关闭,等待新的回答
选为最佳回答
0
Speed Up Your Magento Store by 300%

php bin/magento deploy:mode:set production -s

再执行deploy流程

发表新评论

根据你的答案,测试了几次,总算可以了,感谢。

总结流程(windows系统)
1,处于developer模式下执行:
php bin/magento deploy:mode:set production -s
2,重新部署:
删除/var,/generated/code/,/pub/static/三个文件夹
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

0