-
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
Inconsistent behaviour of getStockItem() and getStockData() #37937
Comments
Hi @GamesmenJordan. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
@magento give me 2.4-develop instance |
Hi @Usik2203. Thank you for your request. I'm working on Magento instance for you. |
Hi @Usik2203, here is your Magento Instance: https://b55f65cec7cab462da44be1f0fd30e6d.instances-prod.magento-community.engineering |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @GamesmenJordan, Thanks for the report and collaboration! We have tried to reproduce the issue in Magento 2.4-develop branch but it seems the issue is not reproducible for us. We have made an Observer in order to reproduce the issue. Please find below the same as a reference: We request you to please review the steps to reproduce and let us know if anything is missed. Thanks |
When async grid update is enabled the instance of IdListBuilder gets reused across multiple grid update tasks. This causes the associated join to the archived grid tables to accumulate for each and results in joining unrelated archived grid tables. In certain circumstances this results in invoices, shipments and creditmemos incorrectly being excluded from the list of IDs not present in the grid.
Dear @GamesmenJordan, We have noticed that this issue has not been updated for a long time. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this. Regards |
Preconditions and environment
Magento version 2.4.5 (tested)
Create simple observer for event
catalog_product_save_before
with the followingexecute
method:Steps to reproduce
$stockData
will be populated with the stock item object, but$stockItem
will be null$stockItem
will be populated with the stock item object, but now$stockData
will be nullExpected result
Both
getStockData()
orgetStockItem()
should behave consistently regardless of how the product is saved, likely both returning the data or one function becoming an alias for the other.Actual result
getStockData()
only returns the stock item object if the product was saved via the admin portal UI, otherwise returning null.getStockItem()
only returns the stock item object if the product was saved via the REST API, otherwise returning null.Both functions return the same stock item object in their respective scenarios.
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: