Duplicate entry for key 'unq_msattr_sid_dom_cod_tid'

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
lina.wolf
Posts: 1
Joined: 29 May 2020, 10:10

Duplicate entry for key 'unq_msattr_sid_dom_cod_tid'

Post by lina.wolf » 29 May 2020, 10:18

I freshly installed "aimeos/aimeos-typo3": "^18.4" within TYPO3 8.7.33 via composer in an existing project running on ddev and mariadb_version: "10.2" and php 7.2.

When adding an article of type "Selection" I get the following error when trying to save it:
FehlerSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-product-P0Y1M0W0D-11' for key 'unq_msattr_sid_dom_cod_tid', /var/www/html/vendor/aimeos/aimeos-core/lib/mwlib/src/MW/DB/Statement/DBAL/Simple.php:91

I tried again how I got there. It seems when you accidentally give the same article code to an article and its variant this error is being provoked.

However once this happened changint the article code of the erroneus variant or even deleting the variant does not make a difference anymore. The product can not be saved anymore.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: Duplicate entry for key 'unq_msattr_sid_dom_cod_tid'

Post by aimeos » 29 May 2020, 20:25

18.4 is very old and not supported any more. Does it also happen that you can't fix the problematic article if you use 19.10 or 20.4?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply