CSV Stock Import Duplicate Entry Error
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!
CSV Stock Import Duplicate Entry Error
Hi there! I have a strange symptom on importing stocks via CSV on TYPO3. I have double checked the csv on duplicate entries in the file - and double checked the database. So, there is only one row with ProdID "13442" in the file and one entry with ProdID "13442" in the database.
But I always get the following Error:
Stock import error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '13442-default-1.' for key 'mshop_stock.unq_mssto_pid_ty_sid':
INSERT INTO "mshop_stock" (
"prodid", "type", "stocklevel", "backdate",
"timeframe", "mtime", "editor", "siteid", "ctime"
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?
)
["13442","default",10,null,"7","2024-04-26 15:03:56","scheduler","1.","2024-04-26 15:03:56"]
But -> if I import only this one line with the related product - everything works fine.
And - even weirder -> if I split the file in chunks with about 100 lines each, although everything works fine.
So where does this "duplicate Entry" Error come from? Any help is very appreciated - but for the moment I can work with the splited files.
CSV contains about 10k lines of data
TYPO3 Version: 11.5.33
aimeos Version: 22.10.9
But I always get the following Error:
Stock import error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '13442-default-1.' for key 'mshop_stock.unq_mssto_pid_ty_sid':
INSERT INTO "mshop_stock" (
"prodid", "type", "stocklevel", "backdate",
"timeframe", "mtime", "editor", "siteid", "ctime"
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?
)
["13442","default",10,null,"7","2024-04-26 15:03:56","scheduler","1.","2024-04-26 15:03:56"]
But -> if I import only this one line with the related product - everything works fine.
And - even weirder -> if I split the file in chunks with about 100 lines each, although everything works fine.
So where does this "duplicate Entry" Error come from? Any help is very appreciated - but for the moment I can work with the splited files.
CSV contains about 10k lines of data
TYPO3 Version: 11.5.33
aimeos Version: 22.10.9
Re: CSV Stock Import Duplicate Entry Error
Do you have the same product code twice in the file?
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 Stock Import Duplicate Entry Error
Sorry for the late reply...
To answer your question: no! All the product codes are unique.
As a solution I split the file in many files with a maximum of 1500 lines of stock. Same data.
If I merge all of the files again to one big file and import it - the error shows up again.
To answer your question: no! All the product codes are unique.
As a solution I split the file in many files with a maximum of 1500 lines of stock. Same data.
If I merge all of the files again to one big file and import it - the error shows up again.
Re: CSV Stock Import Duplicate Entry Error
Would be interesting to find out why and what line is causing that.
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