Bridge Connection - Duplicate entry error, Duplicated data, also it may look like "Error: #23000 Duplicate entry '7650' for key 'PRIMARY' "
Home > For Customers > General information > Knowledgebase > Store Manger Connection and Setup > Bridge Connection - Duplicate entry error, Duplicated data, also it may look like "Error: #23000 Duplicate entry '7650' for key 'PRIMARY' "

Bridge Connection - Duplicate entry error, Duplicated data, also it may look like "Error: #23000 Duplicate entry '7650' for key 'PRIMARY' "

While working via Bridge you need to sync your data very often. For this use Get Data from web (CTRL + G) before you make any changes and Post Changes to Web (CTRL + P) once you're done.

In case you have made changes in Store Manager and forgot to sync them or made changes from Admin simultaneously, you will see the Duplicate entry error 


What does it mean?

It means that while adding any data in Store Manager, item with exactly same ID was added in your remote database, and item with this ID cannot be synced.


How to fix it and loose changes made locally?

Perform Get Data from Web (CTRL + G) to retrieve your latest data from our live site. It will overwrite data stored locally, so you recent changes will be lost. 

Once it is fixed, do not forget to post changes to your site using CTRL + P and do not make further changes simultaneously from multiple Store Manager applications or via Admin.

 

You have made lots of changes locally and do not want to loose them? Or How to fix it without loosing all data?

In case you've made changes to your products, follow few steps:

  1. Make a backup of your live site from your PHP MyAdmin or Hosting control panel, so in case anything goes wrong, you will be able to roll it back.
    We will not make any harmful operation below, though it is a good idea to make a copy of your site before you proceed with any mass changes.
     
  2. Open Store Manager application where you can see changes that you've made and cannot synchronise to your live site.
     
  3. Export all data that was modified locally to csv file. 
    In case you've modified products, use export products wizard. In case you have multiple languages, make sure to export them all to see the data in the file!
    In case you've updated custom options, use export custom options wizard. 
    In case you've manually managed categories data, use export categories wizard, etc.
    So the idea is to export all data that was modified into file (files) on your desktop or some place where you can find it later. Keep a path to those files somewhere. Just default export settings will be fine.
     
  4. Open Preferences (F12) and rename your local DB name. Just ad "new" without any underscores, spaces or symbols.
    ! Do not change anything else, just rename the local database name !



    Hit Ok or apply at the bottom of the form
     
  5. You will be asked to create new local database and retrieve data from your live site. Hit "Get Data from Web button" to retrieve data from web and create our new local database.



    It will create a new accurate local data, same as on your site but without any changes that you've made locally.
    ! Make sure that you can see your live site in Store Manager, without any changes !

    Info: In case you hit [Create new DB], you need to Get Data from web (CTRL + G) once local DB is created.
     
  6. Import those exported files (see step 3) into your newly retrieved database. Use appropriate import wizard for each item.
    For Magento users - If you have multiple languages, you will need to run import few times - each time for each store view / language
    It is a good idea to import categories first, after that import attributes, products, custom options, customers, etc.
    ! Make sure that noone is making any changes to your Magento Admin while you're working now !
     
  7. Check if you can see all changes that you cannot sync in Store Manager now.
    Some specific information cannot be exported/imported, so you may not see it here. Unfortunately those changes may be lost.
     
  8. Post Changes to Web (CTRL + P). This option will push your data to your live site (synchronise changes).
     
  9. Check changes on your live website Admin (Backend).

In case you follow all those steps and changes are not visible on frontend but you can see them in Admin, please try to clear cache and reindex data (for Magento and PrestaShop).

In case you cannot see changes on your site, but they are in your Admin, please check your template. Import operation / backup or posting changes doesn't apply any modifications to your template.

In case you cannot see changes in Admin, contact us via support@emagicone.com and describe the situation, so we could check if we can do anything for you.

 

If I forgot to export some data, can I roll back?

Yes, open Preferences and change database name to the one that you used to have (delete the "new" prefix or postfix that you've just added from the name) and you will see database with changes that cannot be synchronised.

Now you can export data once again. Do not forget to switch back to the New database to import those changes once again and try to sync them.

 

Check more about Bridge connection at https://support.emagicone.com/248531-What-is-PHP-MySQL-Bridge