Reputation: 45124
I followed this tutorial Package the module which I have developed. Module works fine. When I tried to save I get this error "There was a problem saving package data"
as shown in the screenshot too.
Documentation says You will have ”There was a problem saving package data” when you save the extension if there is space inside the module name. But as you can see there is not spaces in the module name.
What could be the issue? How can I fix this?
Upvotes: 2
Views: 1624
Reputation: 2016
Heres another example of adding a group, and then deleting a group.
// Adding attribute options
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "position");
$aClasses = array('Administrator','Dean','Counselor');
$updates = array();
$updates['attribute_id'] = $attribute->getId();
for($cnt = 0; $cnt < sizeof($aClasses); $cnt++) {
$updates['values'][] = $aClasses[$cnt];
}
$setup->addAttributeOption($updates);
die();
// Deleting attribute options
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "position");
//Values have to be deleted one at a time
// Eav Setup.php
$updates = array();
foreach ($attribute->getSource()->getAllOptions() as $option) {
$update['value'] = array();
$update['delete'][$option['value']] = true;
$update['attribute_id'] = $attribute->getId();
$update['value'][$option['value']] = true;
$updates[] = $update;
}
$setup->addAttributeOption($updates);
die();
Upvotes: -1
Reputation: 110
in linux change the connect folder permision to
chmod -R 777 /var/www/magento/var/connect/
Upvotes: 4
Reputation: 45124
NOTE: Extensions are case sensitive. Make sure the package name reflects accordingly in all folders and xml files. e.g. MyExtension is not same as Myextension.
NOTE: The package name must NOT have space inside. For example, use Foo_Bar, don’t use “Foo Bar”. You will have ”There was a problem saving package data” when you save the extension if there is space inside the module name.
Capital letters & spaces matter.
Upvotes: 3