0

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.

enter image description here

Any help appreciated. Also cant find anything in the exception log

2
  • There might be a space in the cell.
    – Cladiuss
    Aug 5, 2023 at 21:47
  • which exact version you are using ?
    – Pawan
    Aug 6, 2023 at 3:19

3 Answers 3

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,

0

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.

1
  • 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.
    – Community Bot
    Aug 9, 2023 at 20:30
0

I have made a hotfix module you can download it from here:

https://github.com/o0mohd0o/ImportExportPatch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.