Magento 1.4 Problem Solving – JavaScript Files Are Not Referenced Properly
- Category: questions, web design, web development
We recently posted solutions to the most common problems people are having with Magento 1.4 (whether you are upgrading your Magento installation or starting with a fresh Magento 1.4 installation).
Another very common problem is when JavaScript files aren’t referenced properly – which creates a bunch of errors and functionality problems.
For example, some JavaScript files may be referenced in this way:
http://storeurl.com/chroot/home/accountname/storeurl.com/html/js/scriptaculous/slider.js
Instead of simply this:
http://storeurl.com/js/scriptaculous/slider.js
(Of course the folder structure will be different based on your particular server configuration.) This bug is caused by a feature in Magento 1.4 that merges all JavaScript files.
Follow these simple steps to fix the problem:
1. Go to System>Configuration and click on the “developer” tab all the way at the bottom of the left column.
2. Then under “JavaScript Settings” select “No” for “Merge JavaScript Files (beta)”.
Important! Follow These Steps If You Have Problems Accessing The Admin:
Once you followed the steps above, everything inside /var/sessions/ and /var/cache and (if applicable) /app/code/core/Zend/Cache/ must be deleted. Otherwise you get this error when you try to log into the admin:
Fatal error: Call to undefined method Mage_Admin_Model_Observer::actionPostDispatchAdmin() in /public_html/app/code/core/Mage/Core/Model/App.php on line 1207
I hope this helps!
Thanks for the tip… ehm.. but what to do if you can’t access the admin panel to alter those settings? I got a blank admin screen in 1.4 after installing some language models (strange enough). Turning on error reporting gave me the exact error you mention here.
Noam - April 1st, 2010
Noam - May 28th, 2010
Then make sure you selected “No” for JavaScript file merging under the right store view.
If that doesn’t solve your problem check with different browsers. Are you getting errors on some browsers only? If so maybe it’s a template issue and has nothing to do with with Magento itself…
http://groups.google.com/group/magento-devel/browse_thread/thread/5c14094df931b79e/29c0fd0d808a255b?lnk=gst&q=unirgy#29c0fd0d808a255b