Attributes Import // Integrity constraint violation: 1062 Duplicate entry
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!
Attributes Import // Integrity constraint violation: 1062 Duplicate entry
Hi there,
I have a strange behavior on importing attributes.xml. We have about 200 attributes in our shop. On a daily basis we do updates from our main database via XML / Scheduler. Everything is fine - except one Attribute. In our XML are no new attributes, as they do not change often. So why do we have one attribute throwing this "duplicate key Error" - and the other nearly 200 attributes don't throw any error?
aimeos: 2022.10.x
TYPO3: 11.5.25
Error:
XML:
Any help or hint would be appreciated
Regards, Kai
I have a strange behavior on importing attributes.xml. We have about 200 attributes in our shop. On a daily basis we do updates from our main database via XML / Scheduler. Everything is fine - except one Attribute. In our XML are no new attributes, as they do not change often. So why do we have one attribute throwing this "duplicate key Error" - and the other nearly 200 attributes don't throw any error?
aimeos: 2022.10.x
TYPO3: 11.5.25
Error:
Code: Select all
Die Ausführung von Task "Aimeos Shop Planer (aimeos)" ist fehlgeschlagen mit folgender Meldung: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'product-Farbe-Senfgelb-1.' for key 'mshop_attribute.unq_msatt_dom_type_code_sid': INSERT INTO "mshop_attribute" ( "key", "type", "domain", "code", "status", "pos", "label", "mtime", "editor", "siteid", "ctime" ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ["product|Farbe|Senfgelb","Farbe","product","Senfgelb",1,0,"Senfgelb","2023-07-19 11:29:39","scheduler","1.","2023-07-19 11:29:39"]
Code: Select all
<attributeitem ref="product|Farbe|Senfgelb">
<attribute.domain><![CDATA[product]]></attribute.domain>
<attribute.type><![CDATA[Farbe]]></attribute.type>
<attribute.code><![CDATA[Senfgelb]]></attribute.code>
<attribute.label><![CDATA[Senfgelb]]></attribute.label>
</attributeitem>
Regards, Kai
Re: Attributes Import // Integrity constraint violation: 1062 Duplicate entry
Check if there's a value of "Senfgelb" with different upper/lower case characters is already in the database.
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