I've written a module with a config section that saves it's data as a serialized array.

After having tested the module and making sure it works, I want to also include default data so that nothing needs to be set up after deploying the code to our live servers.

However, I am having a lot of trouble with setting the default data.

I've removed the stored config data from core_config_data, and have added a serialized array to the module's config.xml like this:


I've tested and made sure that the serialized array used for the default data is correct, and I know the path in the config.xml is correct because I have other default data that is taking effect, but the serialized array is not taking effect at all. I've also made sure that my configuration data cache is disabled.

Is there anywhere else I need to update to make sure that my instance of Magento reverts to loading the default data for this section? Should I change something about the default data itself? (I've tested with CDATA tags and without, with no success).


I had the same problem and was confused. It was working once fine in CE 1.5.x but it seems to be broken in CE 1.8/1.9

The problem is that the serialized default config is given as Mage_Core_Model_Config_Element object into Mage_Core_Helper_UnserializeArray::unserialize

This causes an exception:

exception 'Exception' with message 'Error during unserialization' in ../lib/Unserialize/Parser.php:60

This is a bug introduced by Magento or SUPEE-8788

See here for possible solutions:


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.