Have you recently discovered that when you try to submit a rating from the backend you receive a 404 error? I ran into this issue with a client of mine and after several minutes of debugging installed 3rd party extensions, I found that this is indeed a core coding issue with Magento’s code.
The Magento Bug – Surprisingly I found that Magento had hard-coded the rating block to only check for the default store code! So if a user is not using the “default” store code, they will see this error when trying to submit a review in the backend.
class Mage_Adminhtml_Block_Review_Rating_Detailed extends Mage_Adminhtml_Block_Template
.....
} elseif (!$this->getIsIndependentMode()) {
$ratingCollection = Mage::getModel('rating/rating')
->getResourceCollection()
->addEntityFilter('product')
->setStoreFilter(Mage::app()->getStore('default')->getId())
->setPositionOrder()
->load()
->addOptionToItems();
}
.....
After extending the fix to this code, the admin can now submit reviews in the backend without seeing the 404 error. I have confirmed this issue for sites running 1.8.1.0. I have not had the time to check if this issue is in other versions of Magento at this point. If you discover it is please feel free to leave a comment below.
Now for the fix. Simply replace the code above with this code and presto, you will now be able to submit reviews from the backend.
Create the following structure and file.
app/code/local/Mage/Adminhtml/Block/Review/Rating/Detailed.php
Next, copy the contents of the following file into the one you just created:
app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php
Finally change the above code to:
} elseif (!$this->getIsIndependentMode()) {
$ratingCollection = Mage::getModel('rating/rating')
->getResourceCollection()
->addEntityFilter('product')
->setStoreFilter( ($default_store)
? $default_store->getId()
: Mage_Core_Model_App::ADMIN_STORE_ID )
->setPositionOrder()
->load()
->addOptionToItems();