I'm experiencing Decoding Failed error on saving few downloadable product (not all) from magento 1.x backend

exception 'Zend_Json_Exception' with message 'Decoding failed: Syntax error' in xxx/lib/Zend/Json.php:97
Stack trace:
#0 xxx/app/code/core/Mage/Core/Helper/Data.php(659): Zend_Json::decode('[object Object]', 1)
#1 xxx/app/code/core/Mage/Downloadable/Model/Product/Type.php(219): Mage_Core_Helper_Data->jsonDecode('[object Object]')
#2 xxx/app/code/core/Mage/Catalog/Model/Product.php(541): Mage_Downloadable_Model_Product_Type->save(Object(Mage_Catalog_Model_Product))
#3 xxx/app/code/core/Mage/Core/Model/Abstract.php(319): Mage_Catalog_Model_Product->_afterSave()
#4 xxx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(728): Mage_Core_Model_Abstract->save()
#5 xxx/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->saveAction()
#6 xxx/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('save')
#7 xxx/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 xxx/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#9 xxx/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 xxx/index.php(87): Mage::run('', 'store')
#11 {main}

I really don't know what could be the cause of this issue. Thanks everyone


My observation with this exact same error is this. The Magento version I was running 1.9.x rendering on a Chrome browser. The experience is specific to a Flash embedded functionality on the product page. The Downloadable Information tab locates this functionality on the product admin page. There you can upload files for your product by clicking on the Flash enabled/coded button click event to get an upload dialog box.

The problem is that Chrome has removed support for Flash functionality. I suspect the (non visible) upload button is supplying null values that are supposed to be encoded for delivery in a JSON format. Hence the error during a save event.

When I try the same exercise in Internet Explorer it works (Imagine that). Using Internet explorer 11 which does support Flash as a test, the upload button is visible, it does open a dialog box, it allows the saving of files and the product pages saves without error.

I can only conclude that this absence of Flash support is returning/supplying NULL strings and triggering an error where-ever and whenever the subject web page has Flash embedded functionality and is executed on a Chrome browser. I have not tested this theory on FireFox. I hope this helps anybody else with this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.