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

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

3 Answers 3

6

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,

answered Aug 17, 2023 at 19:35
1
  • It's works 2.4.6 without any issue Commented Oct 17, 2024 at 12:49
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.

answered Aug 9, 2023 at 20:06
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. Commented Aug 9, 2023 at 20:30
0

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

https://github.com/o0mohd0o/ImportExportPatch

answered Aug 20, 2023 at 14:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.