3

Running 1.9.x Magento, I found a handful of products (out of 80k) that have a product attribute value that cannot be edited from the product edit panel.

The attribute value is a custom value called 'runtime', and when I edit the value and hit save,it gives a product saved success msg, but then shows the value same value as before.

When I error log on $productModel->getData() just before save(), I see attribute listed in the data with the correct value, but I see that same attribute with the original value listed under mage_catalogInventory_model_stock_item object in [_defaultValues:protected]. I also see another attribute in that same default Values array, and that attribute is also not editable.

These two attributes exist on almost all of my 80k products, and I am not experiencing this issue on any of the other products I spot checked. The attributes are 'text' type, and the value I'm trying to save is between 3 characters long.

When I manually connect to the db, I can edit the values no problem.

I also only see one entry for this attribute_id and enttity_id in catalog_product_entity_text with a storecode of 0

I have googled this issue to death, and am not getting anywhere. The piece of debug I'm focusing on is below:

[stock_item] => Mage_CatalogInventory_Model_Stock_Item Object
    (
        [_minSaleQtyCache:Mage_CatalogInventory_Model_Stock_Item:private] => Array
            (
            )

        [_qtyIncrements:protected] => 
        [_eventPrefix:protected] => cataloginventory_stock_item
        [_eventObject:protected] => item
        [_productInstance:protected] => Mage_Catalog_Model_Product Object
            (
                [_cacheTag:protected] => catalog_product
                [_eventPrefix:protected] => catalog_product
                [_eventObject:protected] => product
                [_canAffectOptions:protected] => 
                [_typeInstance:protected] => 
                [_typeInstanceSingleton:protected] => 
                [_linkInstance:protected] => 
                [_customOptions:protected] => Array
                    (
                    )

                [_urlModel:protected] => 
                [_errors:protected] => Array
                    (
                    )

                [_optionInstance:protected] => 
                [_options:protected] => Array
                    (
                    )

                [_reservedAttributes:protected] => 
                [_isDuplicable:protected] => 1
                [_calculatePrice:protected] => 1
                [_defaultValues:protected] => Array
                    (
                        [display_string] => test string value
                        [runtime] => 10.32
                    )

Anyone have any suggestions?

  • It might be there are other observers running on product save which are saving other values. – Adarsh Khatri May 11 '17 at 23:49
  • 1
    Can you post your observer code? Btw ... has runtime attribute e defined default value? – sv3n May 12 '17 at 7:47
  • Any updates here? – sv3n Jul 22 '17 at 2:15

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.