douyun3022 2012-03-16 20:30
浏览 23
已采纳

未加载Magento块模板文件

I'm trying to do something very basic: edit a small part of the category product pager template. I copied pager.phtml from .../base/default/template/page/html/ into my own theme's template/page/html folder and changed what I needed changed in the new file. Unfortunately, nothing is changed on the frontend.

I've tried enabling "Template Path Hints" and it definitely shows my custom template being loaded. When I blank out my theme's pager.phtml, all the content stays (as if its still loading the default template). When I edit the default template, still nothing changes! Ah ha! It must be cached...

But I've got the caches disabled (its a development site) and tried refreshing them all anyway. Nothing changes. I've edited many a template on this site and they've all worked as expected, its only pager.phtml that is giving me trouble.

If anyone could point me in the right direction or even toss a few more debugging ideas my way, that would be great. Thanks in advance.

  • 写回答

4条回答 默认 最新

  • dsbezji539113152 2012-03-16 21:33
    关注

    If your caches are off, and you editing the base/default package/theme has no effect, it sounds like you are editing the wrong file ...

    By chance is it a 1.3 template on a 1.4 build - as the pager set-up changed between the two versions and would lead to peculiar issues like you are describing.

    Have you tested overriding another .phtml file to see if it actually works (ie. if you have set it up correctly).

    Finally, caching being the last resort, have you got APC/Eaccelerator installed with the mtime/stat parameter set to false? As this would ignore the file modified time and serve up data directly from its internal cache. An Apache/PHP restart would prove this.

    Verify by running

    php -i | grep mtime
    php -i | grep stat
    

    Or by creating a test phpinfo(); file

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么