-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inventory_source_item sku not updating when user updates product SKU #39335
Comments
Hi @Swannyj. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @Swannyj, Thanks for your reporting and collaboration. We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the attached video. Screen.Recording.2024-11-07.at.10.18.39.movWhen Clicking shipping we are getting the error Hence Confirming the issue. Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13319 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue. |
Preconditions and environment
2.4.6-p6
Steps to reproduce
Create a Product in the CMS. Add a SKU (for example
4201503002/size38/bleu fonce
) and assign a stock source against itSave the Product
Change the Product SKU (for example
4201503002/size38/bleu foncé
)Save
Navigate to the storefront
Add this product to your basket and checkout
In the CMS go to Sales/Orders and find the order
You should see an order item with the updated
sku
(4201503002/size38/bleu foncé
)Click 'Ship'
Expected result
The admin user should be able to click ship and progress through the order journey.
Actual result
The user is presented with the following error
Warning: Undefined array key "4201503002/size38/bleu fonce" in /var/www/website/vendor/magento/module-inventory-source-selection-api/Model/Algorithms/Result/GetDefaultSortedSourcesResult.php on line 140
Additional information
Looking through the
execute
function inGetDefaultSortedSourcesResult.php
, it seems that the code retrieves a list of items in the orderI can see the below in my
debug.log
After this, the code calls the
execute
function inGetInStockSourceItemsBySkusAndSortedSource
I have added the below logging in this function:
which prints the following to my
debug.log
The above ID returns the following from the database
7161324
and back inside theexecute
function inGetDefaultSortedSourcesResult.php
this ID returns the following from the database when it is looping through the$sourceItems
inventory_source_item
tablecatalog_product_entity
tableIMPORTANT
The code uses the
inventory_source_item
sku
and searches the the variable$itemsTdDeliver
for thissku
however this array conatins the productsku
and so returns theundefined array key
error.Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: