2

When I load my frontend my browser returns those weird errors:

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

And when I try to access my backend via /admin I'm being redirected to the frontend (home).

Tried a million things to detect whats going on but nothing seems to work.

My Apache error.log is full of entries like:

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

By the way, my magento install isn't on /var/www, it's placed on /var/www/magento

What am I doing wrong? Can I get some help pretty pretty please?

4 Answers4

4

open "CATALOG.XML" file into your theme

add this code

<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>

Under "default" tag

i hope it works...

Purvesh
  • 628
  • 7
  • 12
  • Not exactly what I was looking for, but it pointed me in the right direction. Needed to open the custom themes page.xml file and copy over the page/html_head addJS scripts from the default page.xml theme – cnizzardini Nov 22 '13 at 02:28
1

You have to set two entries in core_config_data table in your database:

entry with path column with value web/unsecure/base_url should have value column set to something like

http://127.0.0.1/magento/

(assuming that you are working on a local development server) and the same goes for path column with value web/secure/base_url.

These two table entries define the root of your magento installation.

Domen Vrankar
  • 1,743
  • 15
  • 19
  • Isn't it on core_config_data? –  Jan 17 '13 at 11:16
  • You are correct. I was just looking at core_variable table and wrote the wrong table in response... I corrected my answer. – Domen Vrankar Jan 17 '13 at 11:19
  • Already did that, I'm being redirected from the backend to the exact path that I've inserted on web/unsecure/base_url. –  Jan 17 '13 at 11:20
  • If you change those two entries you should also clear cache form admin or delete /var/www/magento/var/cache/ content. – Domen Vrankar Jan 17 '13 at 12:14
  • Did it before too... I can't understand why something is looking for those files in /var/www and why I'm being redirected from the backend to the frontend. –  Jan 17 '13 at 12:54
0

Have a look into the .htaccess and set the RewriteBase correct to /magento

Next try: I didn't know "Uncaught Reference Error" (http://stackoverflow.com/questions/2075337/uncaught-referenceerror-is-not-defined)

But obviously it is something with JavaScript. Are you sure, that your PHP code is executed? What looks the "HTML" sourcecode like?

Fabian Blechschmidt
  • 4,113
  • 22
  • 39
  • Everything works fine on the frontend, people are still able to purchase etc, I think is something related to Apache conf, my error.log is crowded with those "not found" and "does not exist" strings. –  Jan 17 '13 at 17:04
-1

I solved by update core_config_data set value = 'http://yourdomain:8019/' where value = 'http://yourdomain'; in Magento 1.9.1.1

Yu-Shing Shen
  • 373
  • 1
  • 5
  • 10