1

This error has been eating my head since 2 days! I have searched the entire internet!

Scene:
I have a Magento store (1.7.0.2) with 1 website, 1 store and 2 storeviews.
First store view code is my_uk_en
Second store view code is my_uk_ru

Everything works fine until I rename (change) the StoreView to something else.
I renamed the storeview code to my_cz_en, and frontend gives 404 error.

I have checked my index.php and .htaccess files, there is no store called explicitly.

I tried running the new store forecefully by using the following in index.php

$mageRunCode = "my_cz_en";
$mageRunType = "store";
Mage::run($mageRunCode, $mageRunType);

But still same 404! I also ran a search on my entire database with the old storeview code (my_uk_en) and there was no matches.

The storeview is assigned to a CMS homepage as well. The setting Add Store Code to URL is disabled.

Reindex Done. Cache Disabled

Inspite of all these I don't understand why I am getting 404 error.

2

I actually had the same problem a few days ago. Make sure that:

  1. You cleared the cache (as always). :)
  2. You have no place in your entire code base which does something like Mage::app()->getStore('my_uk_en'). If you have the old store code somewhere in your code base and try to instantiate a store instance with it, it will give you a 404 page (which is a pretty weird behaviour, but that is the way it is)! To find the place where you still use it, you may use somethink like grep -Ri 'my_uk_en' from the command line.
  • Yeeha! I ran a full search on entire code base. There was a phtml file which had Mage::app()->getStore('my_uk_en') . I renamed it and it worked! Thanks man!! – Hashid Aug 5 '14 at 6:42
  • You are welcome. Although I always wonder why people accept, but do not upvote answers ;) – Simon Aug 5 '14 at 6:47
  • Simon, I don't have the rep to be able to upvote. If you can upvote my other questions/answers, I will get more rep and I will be able to upvote yours. – Hashid Aug 5 '14 at 6:49
  • Ahhh cheers, mate, I did not know this! – Simon Aug 5 '14 at 6:49

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.