CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
Hello!
I would like to run the CSV import multiple times.
I set the update to change the following attributes.
Then I get the following error:
I tried to find the cause of the error, but so far I have not succeeded.
I rewrote:
from:
to:
But this is not a permanent solution.
Thanks if you have any ideas.
TGergo
PHP 8.1
"aimeos/aimeos-laravel": "^2022.10",
Windows + Homestead Vagrant Linux
I would like to run the CSV import multiple times.
I set the update to change the following attributes.
Code: Select all
'controller' => [
'product' => [
'import' => [
'csv' => [
'processor' => [
// modify by update import
'attribute' => [
'listtypes' => [
'myattribute1',
'myattribute2'
],
],
...
Code: Select all
Unable to import product with code "2": SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '125124-attribute-default-65287-1.' for key 'mshop_product_list.unq_msproli_pid_dm_ty_rid_sid':
INSERT INTO "mshop_product_list" (
"parentid", "key", "type", "domain", "refid", "start", "end",
"config", "pos", "status", "mtime", "editor", "siteid", "ctime"
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
I rewrote:
from:
Code: Select all
INSERT INTO "mshop_product_list"
Code: Select all
INSERT IGNORE INTO "mshop_product_list"
Thanks if you have any ideas.
TGergo
PHP 8.1
"aimeos/aimeos-laravel": "^2022.10",
Windows + Homestead Vagrant Linux
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
Does that also occur if you remove your "listtypes" configuration?
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
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
No, if I take it out, it runs flawlessly.
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
Other problem with this feature.
When I add an attribute to the array
for example: 'myattribute1'
the first value is: text1
I change the value in the csv file: text2
will add text2 but not delete text1
so I have two values:
myattribute1 : text1
myattribute1 : text2
but my csv file contains only one
When I add an attribute to the array
for example: 'myattribute1'
the first value is: text1
I change the value in the csv file: text2
will add text2 but not delete text1
so I have two values:
myattribute1 : text1
myattribute1 : text2
but my csv file contains only one
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
Your configuration is wrong and must be:
Code: Select all
'controller' => [
'jobs' => [
'product' => [
'import' => [
'csv' => [
'attribute' => [
'listtypes' => ['myattribute1', 'myattribute2'],
],
],
],
],
],
],
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
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
Thanks! That was the problem.
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
No, I think the documentation is also bad, this is the right one:aimeos wrote: ↑19 Oct 2023, 10:01 Your configuration is wrong and must be:Code: Select all
'controller' => [ 'jobs' => [ 'product' => [ 'import' => [ 'csv' => [ 'attribute' => [ 'listtypes' => ['myattribute1', 'myattribute2'], ], ], ], ], ], ],
controller/common/product/import/csv/processor/attribute/listtypes
Re: CSV Import attribute INSERT INTO "mshop_product_list" Duplicate entry
At the moment, both are working:
https://github.com/aimeos/ai-controller ... hp#L72-L73
In 2024+, the "controller/common/..." setting will be removed.
https://github.com/aimeos/ai-controller ... hp#L72-L73
In 2024+, the "controller/common/..." setting will be removed.
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