Magento – Item (Mage_Core_Model_Config_Data) with the same id “0” already exist

admin-panelerrormagento-1.9

I get the fallowing error when saving changes under system > configuration > general > design or under system > configuration > sales > payment methods.

I am guessing that whenever Mage_Core_Model_Config_Data is called the error happens. Is my database broken and can I fix it? Magento version is 1.9.1.1
No third party components are used.

There has been an error processing your request

Item (Mage_Core_Model_Config_Data) with the same id "0" already exist

Trace:
#0 C:\xampp\htdocs\mysite\lib\Varien\Data\Collection\Db.php(576): Varien_Data_Collection->addItem(Object(Mage_Core_Model_Config_Data))
#1 C:\xampp\htdocs\mysite\lib\Varien\Data\Collection.php(741): Varien_Data_Collection_Db->load()
#2 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\Model\Config\Data.php(309): Varien_Data_Collection->getIterator()
#3 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\Model\Config\Data.php(292): Mage_Adminhtml_Model_Config_Data->_getPathConfig('design', false)
#4 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\Model\Config\Data.php(221): Mage_Adminhtml_Model_Config_Data->_getConfig(false)
#5 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\Model\Config\Data.php(334): Mage_Adminhtml_Model_Config_Data->load()
#6 C:\xampp\htdocs\mysite\app\code\core\Mage\Paypal\Helper\Data.php(101): Mage_Adminhtml_Model_Config_Data->getConfigDataValue('paypal/general/...')
#7 C:\xampp\htdocs\mysite\app\code\core\Mage\Paypal\Model\Observer.php(130): Mage_Paypal_Helper_Data->getConfigurationCountryCode()
#8 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\App.php(1338): Mage_Paypal_Model_Observer->loadCountryDependentSolutionsConfig(Object(Varien_Event_Observer))
#9 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Paypal_Model_Observer), 'loadCountryDepe...', Object(Varien_Event_Observer))
#10 C:\xampp\htdocs\mysite\app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('adminhtml_init_...', Array)
#11 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\Model\Config.php(93): Mage::dispatchEvent('adminhtml_init_...', Array)
#12 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\Model\Config.php(63): Mage_Adminhtml_Model_Config->_initSectionsAndTabs()
#13 C:\xampp\htdocs\mysite\app\code\core\Mage\Adminhtml\controllers\System\ConfigController.php(88): Mage_Adminhtml_Model_Config->getSections('design')
#14 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#15 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#16 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 C:\xampp\htdocs\mysite\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#18 C:\xampp\htdocs\mysite\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#19 C:\xampp\htdocs\mysite\index.php(87): Mage::run('', 'store')
#20 {main}

Best Answer

I got the Solution of this issue:

This issue occur when your core_config_data table is corrupted.

Please follow the below to fix this issue:-

  • Go to your phpmyadmin

  • browse the core_config_data table and check there is some same value stored in config_id column and this field is not set as an auto increment.

  • First change the same value and make them unique. because this field is auto increment and stored unique value.

  • Go to the structure of the table and set the config_id as primary.

  • After that set config_id field auto increment.

Now check your Issue that may be fixed.

Related Topic