Post reply Return Forum
Utilization module PrestaShop PrestaPricing » 

[FAQ]Duplicates: "The selected synchronization key created an issue" message when running the importation.

Author
Post

Sitolog

Registered on : 12/04/2011

Posts : 494

Posted : 03/13/2014 08:59:34 "Quote"

Many of you are wondering what this sort of alert is all about:

https://www.sitolog.com/img/forum/duplicates.png

This is not a bug, this is a warning indicating you that at least two products, in your database, have the same supplier_reference (with value ‘C004-VW-Golf6’). We call this “duplicates”.

Duplicates are dangerous because in case your file contains one line of data to update such duplicates, only of them will be updated (and it is impossible to determine which one).

The best, in such cases, is either to use another synchronisation key, either to correct the supplier_reference of all duplicates (or to delete the duplicates).
As of today, this process is manual. In future versions of PrestaPricing, I will probably propose an automatic database cleaning function.
If you are good at writting SQL requests and using PHPMyAdmin, be aware that this can be done automatically by switching the field to "Unique key".

But If you do not want to bother with this and simply ignore such warnings, there is an option for this, just check in: "Do not check keys uniqueness” . Then please read carefully the following warning message and confirm.

Code :

When this option left unchecked (default value): When creating new items, the synchronization key will be converted to a unique key in the database.
This means this field could not contain any duplicate value(except NULL values).
This modification to the database can be reverted by changing again the synchronization key.

The import will fail if this field already contains any duplicate (on any products, not necessarily on the products you want to import).

In this case, you will have to take the time to clean the base, by removing ALL duplicates.

However, you can also disable this constraint by setting this option to ON.
In this case, no checking of key uniqueness is made, with the risk to update the wrong item.
It is often the first item found by the SQL query that will be updated (usually the one with the lowest id).

Disabling a uniqueness rule key is therefor a dangerous choice, do so only if you are sure that duplicates do not apply to the products you wish to update.


Rgds
Franck

Post reply Return Forum