OCT 20 2016

Call to a member function setUrl() on a non-object after SUPEE-8788

Problem description

After SUPEE-8788 patch bundle or upgrade to 1.9.3.0 edit product page is broken in backend at Catalog > Manage products > Edit product. The following error logged in PHP error log:

Fatal error: Call to a member function setUrl() on a non-object in app/code/local/MagicToolbox/Magic360/Block/Adminhtml/Settings/Edit/Tab/Form/Element/Gallery/Content.php on line 16

Cause

getUploader()->getConfig() method is replaced with getUploader()->getUploaderConfig() in SUPEE-8788/1.9.3.0, as result some extensions that use it (MagicToolbox/Magic360 or Unirgy/Rapidflow) are now broken.

Solution

Replace getUploader()->getConfig() with getUploader()->getUploaderConfig() in extension code or request a fix from the extension developers. MagicToolbox/Magic360 extension can be fixed like the following:

--- app/code/local/MagicToolbox/Magic360/Block/Adminhtml/Settings/Edit/Tab/Form/Element/Gallery/Content.php.pre-patch 
+++ app/code/local/MagicToolbox/Magic360/Block/Adminhtml/Settings/Edit/Tab/Form/Element/Gallery/Content.php
@@ -14,3 +14,3 @@
 
-        $this->getUploader()->getConfig()
+        $this->getUploader()->getUploaderConfig()
             ->setUrl(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/magic360_gallery/upload'))

Posted in: Fatal errors

Call to a member function setUrl() on a non-object after SUPEE-8788
3 votes, 5.00 avg. rating (96% score)
  • MeltingPotWeb

    FYI – If your error is something along the lines of: Undefined class constant ‘XML_NODE_PRODUCT_MAX_DIMENSION’ check to see if you have a local copy of the image helper: app/code/local/Mage/Catalog/Helper/Image.php – and if so, remove it or rework it based on the updated core version