为什么 Magento 1.4 按文件系统路径包含 javascript 文件? [英] Why is Magento 1.4 including javascript files by filesystem path?

查看:25
本文介绍了为什么 Magento 1.4 按文件系统路径包含 javascript 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Magento 1.4 测试 Magento 1.3 站点.我看到非常奇怪和不一致的行为.Magento 没有包含我的 javascript 文件的 URL,而是使用 js 文件的完整文件系统路径创建标签,如下所示:

I am in the process of testing a Magento 1.3 site using Magento 1.4. I am seeing very weird and inconsistent behavior. Instead of including the URL of my javascript files, Magento is creating tags with the full filesystem path of the js files, as so:

<script type="text/javascript" src="/home/my_username/public_html/js/prototype/prototype.js"></script>

我相信这与新的主题 JavaScript 和 CSS 文件合并为一个文件"功能有关.事实上,当我登录admin并点击Flush JavaScript/CSS Cache"时,第一页加载成功,我看到一个JS包含类似于:

I believe this is related to the new "Themes JavaScript and CSS files combined to one file" function. In fact, when I log into the admin and click "Flush JavaScript/CSS Cache", then the first page load is successful, and I see a single JS include similar to:

<script type="text/javascript" src="/media/js/5b8cfac152fcb2a5f93ef9571d338c54.js"></script>

但是后续的年龄加载会加载每个带有完整路径名的 JS 文件.这显然行不通.有人对可能出现的问题或如何解决此问题有任何想法吗?

But subsequent age loads load every single JS file, with the full path names. Which obviously isn't going to work. Anyone have any ideas on what could be wrong or how to fix this issue?

推荐答案

转到 System -> Configuration -> Developer Settings -> Javascript Settings -> Merge JavaScript Files (beta) 并将其设置为no".这真的是一个测试版 :D

go to System -> Configuration -> Developer Settings -> Javascript Settings -> Merge JavaScript Files (beta) and set it to "no". It is realy a beta :D

这篇关于为什么 Magento 1.4 按文件系统路径包含 javascript 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆