-
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
Reindex cataloginventory_stock does not update cataloginventory_stock_status in 2.4.5 #37450
Comments
Hi @melnickforever. 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.
|
@magento give me 2.4-develop instance |
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Dash, here is your Magento Instance: https://5b73e592efe1511e49bdbf5d6387b67c.instances-prod.magento-community.engineering |
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://5b73e592efe1511e49bdbf5d6387b67c.instances-prod.magento-community.engineering |
Hi @melnickforever, Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots. Steps to reproduce
We have imported a CSV file to update the stock of the product and the stock of the product is updated in both admin and table cataloginventory_stock_status field. We have Imported Below CSV file : When we update status of the product with the import in that case also both are updated. Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible. Thanks. |
Hi @melnickforever, We have noticed that this issue has not been updated for a period of 14 Days. 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. Thanks. |
There is an issue with the cataloginventory_stock indexer. The same value in the cataloginventory_stock_status is put into the table if the product is in stock and the record already exists in the table.
This if statement
attribute_id 96 is product status. |
@magento-admin please reopen |
Anyone looking for a fix. vendor/magento/module-inventory-catalog/Model/ResourceModel/StockStatusExpressionForDefaultStock.php Line 49, |
Thanks @pmathbliss, I had the same issue and this worked for me. |
@pmathbliss Awesome - works here too ! |
Thank you! Good job |
stock-37450-issue.patch |
Does anyone know why this is still an issue in 2.4.x? I see the changes was never merged from magento/inventory#3388 I have been dealing with the issue as well and wanted to find out from @pmathbliss, if we update the code as per above does this automatically correct all products per index? or will that still be an manual process? |
Having same issue on 2.4.6. |
Having the same issue on 2.4.6-p4 |
Confirmed working on 2.4.6-p7 as well, thank you @splacento-incomm this just made my day so much better. One less bug to worry about ..... until the next 🥇 |
Preconditions and environment
Steps to reproduce
Update directly stock_status in cataloginventory_stock_status .(imports can do this)
Run cataloginventory_stock reindex
Expected result
field stock_status in table cataloginventory_stock_status - updated
Actual result
field stock_status in table cataloginventory_stock_status - outdated
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: