首页 文章

Magento Layout Cache正在保存错误的模板名称

提问于
浏览
0

Magento有一个名为Layouts Cache的缓存(见附图)

enter image description here
我有2个主题A和B,我启用了模块X.在主题A中,我在layouts文件夹中有X.xml,它引用了shipping方法的根,并像这样更改模板

<checkout_onepage_shippingmethod>
    <reference name='root'>
        <action method='setTemplate' ifconfig="X/X_config/enabled"><template>magentomod/X/checkout/onepage/shipping_method/available.phtml</template></action>
    </reference>
</checkout_onepage_shippingmethod>

主题B没有't have that layout file, so it'使用旧模板,我清除所有的缓存,开始测试主题A,来到运输方法,一切正常,但后来我切换到主题B和运输方法显示什么,我检查里面 app/code/core/Mage/Core/Block/Template.php 并发现checkout_onepage_shippingmethod的模板名称设置为 magentomod/X/checkout/onepage/shipping_method/available.phtml ,这是主题A中X模块的自定义模板集,但我没有停止这样做,并且在X布局中还有其他几个块正在设置模板这样,但我没有遇到其他块的问题 .

1 回答

  • 0

    最后发现那是因为有人将setCacheKey用于布局文件中的特定值

相关问题