Magento:版本升级后主页上的块没有显示?

Arn*_*nie 1 magento

我最近将我的Magento从1.9.0.1更新到1.9.2.2,更新后没有显示2个块.这是家庭CMS中的代码:

{{block type="catalog/navigation" name="catalog.category" template="catalog/category/cat_list.phtml"}}  

{{block type="filterproducts/latest_home_list" template="callthis/filterproducts/list.phtml"}}
Run Code Online (Sandbox Code Playgroud)

知道他们为什么在更新后不在那里?模板文件在那里,所以这不是原因.我调试了代码,它似乎没有进入模板文件,所以我猜这就是原因,但为什么不去那里?

谢谢!

OSd*_*ave 5

1.9.2.2版本包括SUPEE-6788安全补丁,它修复了允许访问私人信息的漏洞.这意味着CMS页面和电子邮件中使用的块必须列入白名单.
默认情况下,只允许使用core/templatecatalog/product_new块类型.要使用其他的(在你的情况catalog/navigationfilterproducts/latest_home_list)你加入白名单他们.
要做到这一点,您只需要在permission_block表格中包含这些内容.您可以通过直接将它们插入数据库中,或者使用安装脚本来执行此操作,如下所示:

<?php

/** @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();

$installer->getConnection()->insertMultiple(
    $installer->getTable('admin/permission_variable'),
    array(
        array('variable_name' => 'xml_path/custom/variable', 'is_allowed' => 1),
    )
);

$installer->getConnection()->insertMultiple(
    $installer->getTable('admin/permission_block'),
    array(
        array('block_name' => 'catalog/navigation', 'is_allowed' => 1),
        array('block_name' => 'filterproducts/latest_home_list', 'is_allowed' => 1)
    )
);

$installer->endSetup();
Run Code Online (Sandbox Code Playgroud)

请注意,此设置的第一部分是允许自定义配置变量,您不需要它们来解决当前问题,我只是为了完整性而包含它.

您可以在magento的网站上找到有关补丁功能的更多信息