I donβt quite understand the "Use default" checkboxes that you see, but there are two things that I noticed.
Using the Factory Template
Your code:
$_product = new Mage_Catalog_Model_Product();
Use the factory template that is standard for Magento:
$_product = Mage::getModel('catalog/product');
This in itself is not a problem, but it is something to keep in mind.
Updating Product Attribute Only
Further, if you save only a specific attribute, it will be faster (and potentially avoid your problem) if you update only this attribute. For instance:
$attribute = array('attribute_code' => 'attribute_value'); Mage::getSingleton('catalog/product_action') ->updateAttributes($_product->getId(), $attribute, 0);
Link for the updateAttributes () method. My reasoning is that possible defaults are added, preserving the entire product, not just a specific attribute.
If this does not help, perhaps a screenshot of what you see may help me visualize the problem.
source share