I have been migrating a Magento install to one server from another. Normally an everyday process - however I have hit a brick wall, and I think I've hit that point where I am too frustrated to see the solution which hopefully is right in front of my eyes...

All my core JavaScript files seem to be giving me problems, on both the front end and the back end. I can't use the Magento admin menu's, because they're managed by the core js files...

Here's the screens of the error messages showing up in firebug.

Frontend: http://i.imgur.com/PvdAXAb.png

Backend: http://i.imgur.com/TnYEkSI.png

My first thought was permissions weren't set correctly on the JS folder, but I've reset them 3 times, so it shouldn't be that unless 755 for the folders and 644 for the files is incorrect.

Any help would be greatly appreciated, thanks!

  • On the "net" tab of the console can you see some files listed as "404 Missing"? That would be more informative than the javascript errors which follow. – clockworkgeek Oct 13 '14 at 17:12
  • That's part of the craziness that is. There's nothing that's coming up as 404 under net. All the javascript files are there returning 200. The only things not returning 200 are a few image files and those are returning 304, which is not modified. – Johnathon Mathews Oct 14 '14 at 13:52

The answer for me turns out to be related to the Magento JS and CSS Minification process.

Prior to the migration I enabled them and disabled them after noticing a few problems with the process. It went back to working order on the live site, however it completely modified the theme's javascript and css files.

Replacing all the RWD theme CSS and Javascript files along with my child theme's CSS and Javascript files resolved the problem.

I wish there was a way to recover the non-modified CSS files but if redoing my CSS file is the worst outcome from all this I am okay with it.

  • 1
    Feel free to accept your own answer, so this question doesn't count as unanswered anymore – Fabian Schmengler Jul 22 '15 at 10:44

Delete the contents of the var/cache/ and includes/src/ directories (if they exist) and also empty the database cache.

TRUNCATE core_cache;
TRUNCATE core_cache_tag;
  • Thanks, I did that as well. Ultimately I figured it out - right before the Migration I made the mistake of enabling minification on both Javascript and CSS. I disabled them, however it seems that didn't return everything back to how it was. Needless to say overwriting all the old theme's Javascript and CSS files it returned to working order. Sadly it means recreating the CSS stylesheet because I didn't make a unmodified backup of those files prior to the migration. – Johnathon Mathews Oct 15 '14 at 13:54

If issue with admin drop down menu Browser console also shows = ReferenceError: require is not defined

fix: Switch to the developer mode, and the static content will be deployed automatically . uncomment below line inside .htaccess of root folder SetEnv MAGE_MODE developer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.