|
The problem’s caused by using the 1.7 version of the GoogleShopping API extension with a version of Magento pre 1.7.
The method Mage_AdminNotification_Model_Inbox::addMajor was added in Magento 1.7, so running this extension in 1.6 or before will lead to the error.
From the stack trace:
)";i:1;s:1900:"#0 /home/test/public_html/cart/app/code/core/Mage/GoogleShopping/Model/Observer.php(116): Varien_Object->__call(’addMajor’, Array) #1 /home/test/public_html/cart/app/code/core/Mage/GoogleShopping/Model/Observer.php(116): Mage_AdminNotification_Model_Inbox->addMajor(’Google Shopping...’, ‘One or more goo...’)
I looked in app/code/core/Mage/GoogleShopping/Model/Observer.php and found the call to Mage_AdminNotification_Model_Inbox->addMajor..., the following for context:
public function checkSynchronizationOperations(Varien_Event_Observer $observer) { $flag = Mage::getSingleton('googleshopping/flag')->loadSelf(); if ($flag->isExpired()) { Mage::getModel('adminnotification/inbox')->addMajor( Mage::helper('googleshopping')->__('Google Shopping operation has expired.'), Mage::helper('googleshopping')->__('One or more google shopping synchronization operations failed because of timeout.') ); $flag->unlock(); } return $this; }
The bit that’s causing the problem is just the notificaiton of the error messages. We don’t need that right now, since we know it’s a problem (!!) So comment that out, and everything will work fine:
if ($flag->isExpired()) { /* Mage::getModel('adminnotification/inbox')->addMajor( Mage::helper('googleshopping')->__('Google Shopping operation has expired.'), Mage::helper('googleshopping')->__('One or more google shopping synchronization operations failed because of timeout.') );*/ $flag->unlock(); }
Then, remove the extension cleanly, and go to the Release Notes section of the Google Content API for Shopping extension page, and get the correct version of the extension for your version of Magento.
As a relative newbie, I found the Magento Connect page a bit misleading, in that the “Install” button had “Compatible: 1.6, 1.7” next to it, but in reality, using that button led to these problems!
Jeremy
|