The block class app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php, at line 74 calls the setStoreFilter(), using a hard-coded store code "default", which generates an exception when there are no stores in Magento with code "default", and when error pages are switched off, forwards the admin user to 404 page.
To reproduce the problem, create a second store and related store view in Magento, change the "default" store code to "mystorecode", then go to Admin menu "Catalog > Reviews and Ratings > Customer Reviews > All Reviews" and press the "Add New Review" button.
The proposed fix is the following:
--- a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php
+++ b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php
@@ -68,10 +68,13 @@ class Mage_Adminhtml_Block_Review_Rating_Detailed extends Mage_Adminhtml_Block_T
->addRatingOptions();
} elseif (!$this->getIsIndependentMode()) {
+ $default_store = Mage::app()->getWebsite()->getDefaultStore();
$ratingCollection = Mage::getModel('rating/rating')
->getResourceCollection()
->addEntityFilter('product')
- ->setStoreFilter(Mage::app()->getStore('default')->getId())
+ ->setStoreFilter( ($default_store)
+ ? $default_store->getId()
+ : Mage_Core_Model_App::ADMIN_STORE_ID )
->setPositionOrder()
->load()
->addOptionToItems();
simply replace:
$ratingCollection = Mage::getModel('rating/rating')
->getResourceCollection()
->addEntityFilter('product')
->setStoreFilter(Mage::app()->getStore('default')->getId())
->setPositionOrder()
->load()
->addOptionToItems();
with:
$default_store = Mage::app()->getWebsite()->getDefaultStore();
$ratingCollection = Mage::getModel('rating/rating')
->getResourceCollection()
->addEntityFilter('product')
->setStoreFilter( ($default_store)
? $default_store->getId()
: Mage_Core_Model_App::ADMIN_STORE_ID )
->setPositionOrder()
->load()
->addOptionToItems();
Hope this solves the problem.