Magento更新后阻止不工作
-
28-09-2020 - |
题
我最近从Magento1.5.1升级到Magento1.9.2.3,并注意到我的网上商店上的一个块不再起作用。我有一个名为"Bestsellers"的静态块,在该块中,我有这种代码的平静:
{{block type="catalog/product_bestseller" template="catalog/product/bestseller.phtml"}}
这在我的旧网上商店工作,但不是新的。我试过将类型更改为 core/template
, ,我已经尝试将块添加到系统->权限->块:
core/template
catalog/product_bestseller
我试过增加畅销书。phtml到其他模板,如我的基本文件夹。我也看了stackexchange,但我发现的"解决方案"对我不起作用。我该怎么做才能解决这个问题?
编辑:我的系统。日志说以下内容: Security problem: <span>catalog</span>/product_bestseller has not been whitelisted.
解决方案
您可以配置允许的变量和块 System > Permissions > Blocks
和 System > Permissions > Variables
.
你必须补充 core/template
和 catalog/product_bestseller
封锁那里。此功能在Community Edition1.9.2.2和Magento Enterprise Edition1.14.2.2中添加
更新资料 : 前往 许可-可变 表在数据库和删除 核心/模板 和 目录/产品销售商 这些条目是块而不是变量。
我想你在安装中缺少一些文件。像畅销书块和布局更新。
如需更多帮助,请参阅以下内容 如何在Magento+源代码中显示畅销产品
其他提示
从Magento1.5跳跃。x到1.9。如果不升级模板,x可能是危险的。
你应该登记 catalog/product/bestseller.phtml
并尝试了解它是否使用了一些过时的方法。
做一个简单的测试只是暂时删除 catalog/product/bestseller.phtml
所以它会从你的 base/default
看看是否有效。
P.S.:默认Magento安装没有任何块调用 catalog/product_bestseller
, ,是来自习俗吗?如果是,您应该检查其合规性。