Today just before lunch (around the time a reindex was being pushed through) the category urls started throwing up 404 errors.
Site in question:
However, if you search a product (eg: ttrs) the search works fine, as do the product links. Also all CMS pages such as company info work perfect.
Anyone got any ideas?
Ive a feeling its an issue with the Catalog URL Rewrite Reindex as this seems to fail/remain unfinished.
Any help appreciated 🙂
Best Answer
Programmatically speaking, the category page will return a noRoute/404 page when the call to
_initCategory
returns false.The
_initCategory
method returns false for three reasonsWhen a category id can't be extracted from the request,
When the
catalog/category
helper'scanShow
method returns false,When an observer of the
catalog_controller_category_init_after
event throws an exceptionThe
canShow
method mentioned above returns false for three reasons.If the category has no id,
The category's active property is set to false
Or the category isn't in the root category list
Some quick temporary debugging code in the above files should get to the bottom of your problem.
If
viewAction
method isn't being called, it means your rewrites aren't being created. If you're using Commerce Bug (my commercial Magento debugging extension) the Request tab will quickly tell you which controller action method is being called.