2013-02-13 34 views
2

我跟着這個tutorial打包我開發的模塊。模塊工作正常。當我試圖保存時,我也得到了這個錯誤"There was a problem saving package data",如截圖所示。錯誤:「有一個問題保存包數據」 - Magento

enter image description here

文件說您將有「有保存包數據有問題」當您保存擴展,如果有模塊名稱內部空間。但是,您可以看到模塊名稱中沒有空格。

可能是什麼問題?我怎樣才能解決這個問題?

+0

請問您是否可以檢查名稱和通道字段值後面是否有空格?它有時會無意中發生。 – Kalpesh 2013-02-13 10:18:44

+0

不,它不。 – Techie 2013-02-13 10:20:49

+0

好吧,您可能會在其他標籤數據中出現錯誤。 – Kalpesh 2013-02-13 10:24:01

回答

3

注意:擴展區分大小寫。確保包名相應地反映在所有文件夾和xml文件中。例如MyExtension與Myextension不同。

注:包名不能有空格。例如,使用Foo_Bar,不要使用「Foo Bar」。如果模塊名稱中有空格,則保存擴展名時將出現「保存包數據時出現問題」。

大寫字母&空格很重要。

+0

男人!那幫助! – 2013-03-28 14:36:26

+0

很高興它幫助:-) – Techie 2013-03-28 14:42:17

4

在linux 所述連接夾permision更改爲

CHMOD -R 777 /無功/網絡/ magento中的/ var /連接添加組,然後刪去/

+1

我相信有一個更好的解決方案,而不是盲目'chmod'ing'777'。 – cpburnz 2014-06-07 15:00:00

+0

這個解決方案很好 - 當你構建擴展時,你真的只是從一個開發框中這樣做。 – 2015-10-30 19:11:35

+0

這有幫助... – 2016-03-30 10:37:06

-1

下面有另一示例一個小組。

// 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();