加载Magento页面时出现奇怪的错误

时间:2013-01-17 10:37:22

标签: php apache magento

当我加载我的前端时,我的浏览器会返回那些奇怪的错误:

Uncaught ReferenceError: Mage is not defined
Uncaught ReferenceError: Varien is not defined
Uncaught ReferenceError: decorateGeneric is not defined
Uncaught ReferenceError: VarienForm is not defined
Uncaught ReferenceError: VarienForm is not defined

当我尝试通过/ admin访问我的后端时,我被重定向到前端(主页)。

尝试了一百万件事情来检测最新情况,但似乎没有任何效果。

My Apache error.log中包含以下条目:

File does not exist: /var/www/skin
script '/var/www/index.php' not found or unable to stat
script '/var/www/cron.php' not found or unable to stat

顺便说一句,我的magento安装不在/ var / www上,它放在/ var / www / magento

我做错了什么?我能得到一些非常漂亮的帮助吗?

4 个答案:

答案 0 :(得分:4)

在您的主题中打开“CATALOG.XML”文件

添加此代码

<default>

    <reference name="head">
        <action method="addJs"><script>varien/product.js</script></action>
        <action method="addJs"><script>varien/configurable.js</script></action>

        <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
        <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
        <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
    </reference>

</default>

在“默认”标签下

我希望它有效......

答案 1 :(得分:1)

您必须在数据库的core_config_data表中设置两个条目:

带有值为web / unsecure / base_url的路径列的

条目的值列应设置为

http://127.0.0.1/magento/

(假设您正在使用本地开发服务器),对于具有值web / secure / base_url的路径列,情况也是如此。

这两个表条目定义了magento安装的根目录。

答案 2 :(得分:0)

查看.htaccess并将RewriteBase设置为/ magento

接下来尝试: 我不知道“Uncaught Reference Error”(http://stackoverflow.com/questions/2075337/uncaught-referenceerror-is-not-defined)

但显然它是JavaScript的东西。你确定你的PHP代码被执行了吗?什么看起来像“HTML”源代码?

答案 3 :(得分:-1)

我解决了 update core_config_data set value = 'http://yourdomain:8019/' where value = 'http://yourdomain'; 在Magento 1.9.1.1

相关问题