when i try to save Attributes to an Attribute Set, i get the confirmation that its been saved. When i reopen the Set, no attribute is saved to my Set.

Log file says:

ERR (3): Warning: Cannot use a scalar value as an array in app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php on line 138


$data = Mage::helper('core')->jsonDecode($this->getRequest()-getPost('data'));
$data['attribute_set_name'] = $helper->stripTags($data['attribute_set_name']);
  • The PHP error is very explicit. $data is not an array. Your code assumes that $data will always be an array, and will always contain 'attribute_set_name'. Are you certain that $data is always going to contain a valid array? What is the value of $data when you get this error? – Perry Holden Aug 30 '17 at 16:29
  • Value is just a 1 – user58236 Aug 30 '17 at 16:40
  • I should say, we transfered all attributes and products by database from a other magento-store (same Version). Maybe i missed a table, all products and shop are working fine. – user58236 Aug 31 '17 at 6:55

Your Answer

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

Browse other questions tagged or ask your own question.