I think the currency is missing in the directory_currency_rate table.
Check the table for your currency. If it is missing, you have two options to solve it.
- Enable the cronjob to retrieve the currency from the webservice in configuration.
- Go to "System > Manage Currency > Rates and click the import button
You should clear the cache and delete all your cookies (to get rid of your session and shopping cart) afterwards and test again.
If you look at the file to which magento points out, you can find the below line which comes inside dispatch
method
File : app/code/core/Mage/Core/Controller/Varien/Front.php
$this->_getRequestRewriteController()->rewrite();
The error says rewrite()
is calling on a non-object
. This means that, $this->_getRequestRewriteController()
provides you a non-object
(most probably it returns an empty value).
Why $this->_getRequestRewriteController()
gives you a non-object
? In order to find the reason, let us have a look on this method definition.
protected function _getRequestRewriteController()
{
$className = (string)Mage::getConfig()->getNode('global/request_rewrite/model');
return Mage::getSingleton('core/factory')->getModel($className, array(
'routers' => $this->getRouters(),
));
}
The method just trying to create a model instance of $className
. Here $className
holds a value which is returned by $className = (string)Mage::getConfig()->getNode('global/request_rewrite/model');
. The default value which return by this call is core/url_rewrite_request
. This means the method _getRequestRewriteController()
is supposed to return an instance of model class Mage_Core_Model_Url_Rewrite_Request
by defalt.
Based on this analysis, the error may be caused due to
You may have a wrong class name in the above specified node. app/code/core/Mage/Core/etc/config.xml
is used to define this node value. Since it is a core file, alternation happens here may be a rare chance. There is a possibility of rewriting this node by any external plugins. So this should be validated first.
Ultimately your magento application do not have the file which defines this class Mage_Core_Model_Url_Rewrite_Request
which normally appers at app/code/core/Mage/Core/Model/Url/Rewrite/Request.php
I have found out some threads, which gives a hint that permission problems on var/cache
directory may also cause this weird issue.
Hope that helps.
Best Answer
Try clearing cache, and check file permissions are correctly set,
Directories : 755
Files : 644
Else another alternative is Reinstall Magento and do following steps:
It may solve the issue, but suggested to have round of research before doing and surely back up database:
Before to import database : - Add query
OR
at beginning of sql import script
After import / installation : - Execute following query