when we get a 404 by going to something like www.yoursite.com/cowsaremyfriends you get the cms page that has been set as the 404 page in the backened

however, in the errors folder, there is a 404.phtml, what i've been tasked to do i set up the 404 page so that instead of it just being a dead end it's a bit more smarter like suggesting what page you might have been trying to go to

i am wondering how does this 404.phtml page gets called over the CMS one set in the backened as it would be easier to pull off what i am trying to do in that rather than a CMS page

1 Answer 1


You probably want to read Magento's Many 404 Pages. It outlines the various ways Magento can 404 on you, including the page you're talking about.

The short version: The 404 page in the errors folder (that's errors/404.php, which ultimately includes the 404.phtml file), will render if some piece of Magento code throws a Mage_Core_Model_Store_Exception exception, that exception is uncaught, and Magento isn't running in developer mode.

My quick untested way to achieve your goal would be to get your CMS 404 page to throw a Mage_Core_Model_Store_Exception.

  • i read though the page, i didn't realize there was a fall back if there was no 404 CMS, after i changed the URL Key of the 404 CMS to be no-route-old i was able to get the fall back template, this one would actually be better to use as i have better access to the collections rather than the 404.phtml file in errors/[THEME]/404.phtml, and if i still need to get the 404.phtml file i can throw the exception in no-rote.phtml, thanks Alan
    – Memor-X
    Aug 9, 2013 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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