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

查看:58
本文介绍了为什么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文件合并到一个文件功能有关。事实上,当我登录管理员并单击刷新JavaScript / CSS缓存时,第一页加载成功,我看到一个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?

推荐答案

转到系统 - >配置 - >开发人员设置 - > Javascript设置 - >合并JavaScript文件(测试版)并将其设置为否。它真的是一个beta: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天全站免登陆