I am experiencing this error when Importing stock via CSV file:
systemException Additional data: Warning: Undefined array key "source_code" in /var/www/html/vendor/magento/module-inventory-import-export/Model/Import/SourceItemConvert.php on line 40
My file passes validation and always fails this.
Any help appreciated. Also cant find anything in the exception log
-
There might be a space in the cell.Cladiuss– Cladiuss2023年08月05日 21:47:59 +00:00Commented Aug 5, 2023 at 21:47
-
which exact version you are using ?Pawan– Pawan2023年08月06日 03:19:51 +00:00Commented Aug 6, 2023 at 3:19
3 Answers 3
I had the same issue in our project. I fixed it by doing these:
1- TRUNCATE TABLE importexport_importdata; 2- TRUNCATE TABLE import_history;
You can try this please take a backup from your database before making any modifications.
if this answer solved your problem mark it as resolved.
Thanks,
-
It's works 2.4.6 without any issueArunendra– Arunendra2024年10月17日 12:49:37 +00:00Commented Oct 17, 2024 at 12:49
I think it is a problem with the Magento inventory module, I am using the same template that I used in version 2.4.6. and now it doesn't work in version 2.4.6-p1, even if you download a file from the current stocks, and then try to upload it, I get the error.
-
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.2023年08月09日 20:30:13 +00:00Commented Aug 9, 2023 at 20:30
I have made a hotfix module you can download it from here: