Duplicate entry for key 'unq_msattr_sid_dom_cod_tid'
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!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Duplicate entry for key 'unq_msattr_sid_dom_cod_tid'
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.
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.
Re: Duplicate entry for key 'unq_msattr_sid_dom_cod_tid'
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, give us a star
If you like Aimeos, give us a star