So, I updated the "product_length" label attribute and now I can't save a new product value to this attribute. I can't save this value by admin or programatically.

$_product = Mage::getModel('catalog/product')->load(12448);
$_product->getData('product_length'); // '195'
$_product->setData('product_length', '29');
$_product = Mage::getModel('catalog/product')->load(12448);
$_product->getData('product_length'); // '195'

New products (that are created after the attribute update) works fine.

I already tried reindex all, disable and enable flat tables, clear cache (redis and files) and nothing works. There's nothing in exception.log or system.log.

Somebody help me, please! =)

2 Answers 2


You can use following code

$product = Mage::getModel('catalog/product')->load(1);
try {
} catch(Exception $e) {
  echo "{$e}";

it will display error if there any error.

Your you can use this it's works for me

// below code use for time format 
$product->getResource()->saveAttribute($product, 'special_from_date');

I find the solution!!

When I updated the attribute's label via admin, the 'backend_type' at 'eav_attribute' mysql table changed from 'int' to 'varchar'. So I executed the query:

UPDATE `eav_attribute` SET `backend_type` = 'int' WHERE `eav_attribute`.`attribute_id` = 177;

and solves the problem.

I hope this can help you too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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