Magento 1.9 – Fix Fatal Errors After Update from 1.7

fatal errormagento-1.7magento-1.9upgrade

I tried upgrading my shop from 1.7 to 1.9 but this caused sever problems on my webshop. (I did this via Magento Connect) Due to many custom made modules made by my predecessor I had no choice but to revert back to the old back upped file systen.

I tried reverting to a back up and reverted all the files on the FTP to the old version from before the update (only the files didn't revert the database yet).

Now I'm receiving this error on the site (frontend)

Fatal error: Undefined class constant 'METHOD_BML' in /home/users/amanvftp/amanvida.eu/app/code/core/Mage/Paypal/Block/Bml/Banners.php on line 75

In that file on line 75 is the following code

if (!$this->_getConfig()->isMethodAvailable(Mage_Paypal_Model_Config::METHOD_BML)
            && !$this->_getConfig()->isMethodAvailable(Mage_Paypal_Model_Config::METHOD_WPP_PE_BML)) {
            return '';
        }

The page stops processing there and is blank below that error.

In the backend, the admin section. I have a similar problem with the following error:

Fatal error: Undefined class constant 'XML_PATH_TAX_NOTIFICATION_URL' in /home/users/amanvftp/amanvida.eu/app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php on line 175

Code:

public function getInfoUrl()
    {
        return $this->_app->getStore()->getConfig(Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_URL);
    }

Also in the Magento Connect it still shows "1.9.2.1 (stable) " next to the mage modules.

How can I resolve this issue?

Best Answer

Make sure that app/code/core/Mage/Paypal/Model/Config.php is up do date.
as you can see here, the constant is defined in that class.
maybe you copied the Mage_Paypal_Model_Config class in the local codepool for some reason and you are still using the old version of the class. Check if you have the file app/code/local/Mage/Paypal/Model/Config.php.
If you do, you need to add the constant in that file also.
The same goes for the class Mage_Tax_Model_Config.
You can see here that the constant XML_PATH_TAX_NOTIFICATION_URL is defined

Related Topic