cancel
Showing results for 
Search instead for 
Did you mean: 

how to resolve below error

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

how to resolve below error

On homepage Item (Mage_Core_Model_Store) with the same id "0" already exist

8 REPLIES 8

Re: how to resolve below error

Hi @poojasol08

 

Could you provide more details or some code sample which you are using on home page?

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: how to resolve below error

Actually i am getting this error on homepage

Item (Mage_Core_Model_Store) with the same id "0" already exist
*Trace:*
#0 /home/hravenues/tyrestockexchange/lib/Varien/Data/Collection/Db.php(576):
Varien_Data_Collection->addItem(Object(Mage_Core_Model_Store))
#1 /home/hravenues/tyrestockexchange/app/code/core/Mage/Core/Model/Resource/Store/Collection.php(174):
Varien_Data_Collection_Db->load(false, false)
#2 /home/hravenues/tyrestockexchange/lib/Varien/Data/Collection.php(752):
Mage_Core_Model_Resource_Store_Collection->load()
#3 /home/hravenues/tyrestockexchange/app/code/core/Mage/Core/Model/App.php(635):
Varien_Data_Collection->count()
#4 /home/hravenues/tyrestockexchange/app/code/core/Mage/Core/Model/App.php(477):
Mage_Core_Model_App->_initStores()
#5 /home/hravenues/tyrestockexchange/app/code/core/Mage/Core/Model/App.php(360):
Mage_Core_Model_App->_initCurrentStore('', 'store')
#6 /home/hravenues/tyrestockexchange/app/Mage.php(684):
Mage_Core_Model_App->run(Array)
#7 /home/hravenues/tyrestockexchange/index.php(86): Mage::run('', 'store')
#8 {main}

Re: how to resolve below error

Hi @poojasol08

 

Did you import a data base to your local setup?

Please check following http://magento.stackexchange.com/a/60962/3895 it may help you.

 

Did you check any template or code used for the Home page? It may help you to find the issue.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: how to resolve below error

hi @Mukesh Tiwari

 

Actually i moved my magento store from one server to another server. I already import database from older server. Due to this i am getting same error for various tables and collections

Re: how to resolve below error

@poojasol08

 

There seems some problem with database. Could you try to re import the database and check again?

Or you may try solution provided by Fabian at following link http://magento.stackexchange.com/a/84144/3895

 

Try to take database dump using SSH and for import also use SSH commands.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: how to resolve below error

hi @Mukesh Tiwari

 

I import database, while importing database it display a warning 'Your execution is not completed, you can resume import ' on phpmyadmin. So as per error i want to ask is there any way to increase import execution time limit on mysql server, Or i should breakdown the database file and import a bunch of tables separately.

Re: how to resolve below error

Hi @poojasol08

 

If you are using xampp on localhost try following.

 

1) Go to command prompt

 

2) mysql -u <username> -p <databasename>  < C:\Users\username\Desktop\DB.sql

then press enter  and provide the password for the mysql.

 

It will start a import process for you. You can modify the command on the Linux server like following

 mysql -u <username> -h <host ip address> -p <databasename>  <  /var/www/DB.sql  

 

Note: replace /var/www/DB.sql    with the actual path of DB dump file.

 

 

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: how to resolve below error

CASE 1:

Check core_store, core_website and core_store_group tables.

SELECT * FROM core_store WHERE code='admin';
SELECT * FROM core_store_group WHERE name='Default'; SELECT * FROM core_website WHERE code='admin';

There is a possibility that in these tables Admin is created as 1 for id. It should be 0 in all cases. 

UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';

CASE 2:

In another case, you might have 0 for id but there can be multiple rows inserted with the same value.

 

Delete such duplicate rows from core_store, core_website and core_store_group tables and the issue will be solved.