This is just a quick post about the Magento javascript giving a 404 error because it tripped me up and really shouldn’t trip anyone up. Basically the problem is the javascript include in Magento that looks like the one below gives a 404 error and causes javascript errors on the page:
<script type="text/javascript" src="http://example.com/js/index.php?c=auto&f=,prototype/prototype.js,prototype/validation.js..../> |
The problem
Trying to load the javascript URL directly in a browser gives a 404 error, which in turns breaks everything javascript related in Magento. For example the checkout page will no longer work, the Magento admin menus do not display which then causes the whole admin interface to be unusable.
The fix
Set the correct permissions on the javascript files in you Magento installation.
cd /path/to/your/magento/ chmod -R 755 js/* |
That should get the javascript files showing up again without the 404 error, and once they are, your Magento admin interface, add to cart, checkout and everything else that relies on javascript, will also work, yah!