Skip to content
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 BUG. Products not appearing at frontend #38570

Closed
2 of 5 tasks
davirs opened this issue Apr 2, 2024 · 10 comments
Closed
2 of 5 tasks

INVENTORY BUG. Products not appearing at frontend #38570

davirs opened this issue Apr 2, 2024 · 10 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.6-p3 Indicates original Magento version for the Issue report.

Comments

@davirs
Copy link

davirs commented Apr 2, 2024

Preconditions and environment

  • Magento 2.4.6-p3
  • This error is not easy to reproduce, but it occurs in all my stores that are in production.
    Basically, as products are changed in Magento directly via panel or API, this error occurs in part of the changed products. I couldn't identify any patterns.

Steps to reproduce

1 - Register/update hundreds of configurable products and their aggregated products. In my case, I use API to register, change and set stock, but I was able to simulate directly in the Magento panel.
2 - Some of these registered products are in stock and all their settings are normal like any other product, they are enabled but will not appear on the frontend.
3 - You can clear the indexes, it won't solve it.
4 - You can clear all caches, it won't solve it.
5 - You can make changes within the product and save, it won't solve it.
6 - The bugged product will not appear in the frontend in any way.

Expected result

Any registered or modified product that is in stock and enabled should appear on the frontend normally.

Screenshot_24

Actual result

Currently, some of the updated products have this problem, they don't appear in the frontend at all!

Screenshot_20

Screenshot_21

Additional information

I've read several issues about similar cases, I've tried applying several fixes but none of them helped me solve the problem.

issue examples:
#35724
magento/inventory#3350

I discovered in these cases that I am reporting the product does not appear at all in the frontend, it is possible to "force" this BUG to be circumvented in two ways:

1 - Unlink all products from the configurations within the configurable product, save the product, link all configurations again within the configurable product and save the product.
After completing this step by step process, the product appears instantly on the frontend, without having to make any edits to any of the products.

Screenshot_23

2 - Update the "control stock" field within the products. Just go to the "Advanced Inventory" option within the product registration, uncheck the "Use Config Settings" box and set "manage stock = yes" and then save the product.
After completing this step by step process, the product appears instantly on the frontend, without having to make any edits to any of the products.

Screenshot_22

The big problem is the large flow of products! It's impossible to take care of one by one if Magento is working as it should...
All my 4 magento 2.4.6-p3 stores have this same problem in production.

Is there actually a patch or something concrete that solves this problem?

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Apr 2, 2024

Hi @davirs. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.6-p3 Indicates original Magento version for the Issue report. label Apr 3, 2024
@engcom-Hotel engcom-Hotel self-assigned this Apr 4, 2024
Copy link

m2-assistant bot commented Apr 4, 2024

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel
Copy link
Contributor

Hello @davirs,

Thanks for the report and collaboration!

We have tried to reproduce the issue in Magento 2.4.6-p3 and the latest development branch i.e. 2.4-develop but the issue is not reproducible for us. We have 640 Configurable Products, and 39360 Simple Products in our instance. We have followed the below steps:

  1. Setup Vanilla Magento instance
  2. Create products using Magento performance toolkiit, we have used Medium profile.
  3. Try to edit a configurable product mark it as out of stock and check the value cataloginventory_stock_status.stock_status, it is set to 0
  4. Try to get the product from the frontend, it is showing out of stock, which is expected.
  5. Edit the same product to make it in-stock and check the value cataloginventory_stock_status.stock_status, it is set to 1
  6. In the frontend the issue is visible with in-stock status.

I suggest you please check the error log, you may get some more information on this issue. Also, have you tried the patch provided in this comment?

Thanks

@engcom-Hotel engcom-Hotel added Issue: needs update Additional information is require, waiting for response and removed Issue: ready for confirmation labels Apr 4, 2024
@engcom-Hotel
Copy link
Contributor

Dear @davirs,

We've observed that there haven't been any updates on this issue for quite some time. Therefore, we're assuming it's been resolved and will be closing it. Feel free to open a new ticket or reopen this one if you require further assistance.

Regards

@LaurensGoedel
Copy link

We have exactly the same issue. And after some googling, more people are experiencing this issue.
@davirs did you find a solution or work-around for this?

@MLisiecki
Copy link

MLisiecki commented Dec 4, 2024

@davirs The best I have found is:

UPDATE cataloginventory_stock_status INNER JOIN catalog_product_entity ON product_id=catalog_product_entity.entity_id SET stock_status = 1 WHERE type_id = 'configurable';

@davirs
Copy link
Author

davirs commented Dec 4, 2024

@MLisiecki Thanks for sharing.
In my case, it only appears on the frontend if the products are re-associated.
this "manage stock" test does not solve the problem

@LaurensGoedel @engcom-Hotel
I can't find a solution for this.

All the stores I have and all the integrations with different ERPs that I have done have this same problem.

These are not isolated cases, all Magento users have this problem.

@engcom-Hotel
Copy link
Contributor

Hello @davirs,

Actually, we have closed this issue because we are unable to reproduce this issue. Please refer to this #38570 (comment).

Let us know if we missed anything.

@davirs
Copy link
Author

davirs commented Dec 9, 2024

@engcom-Hotel Okay, but how can you test if this error occurs during an API integration? Did you connect a real ERP with real data? Registrations, updates, deletions?

As I said, this problem is real. I have already connected Magento to 3 different ERPs, and all 3 have the same problem.

I couldn't identify what is causing the problem here, because everything works normally. The ERP makes the requests normally, and doesn't give any kind of error. Magento simply doesn't "recognize" the information that was saved.

So I reported a real problem that impacts all users of the platform. Whether you can test it is another matter... In my opinion, it is a serious API problem.

@ZenDevDarioVranjkovic
Copy link

ZenDevDarioVranjkovic commented Dec 13, 2024

Hello, I have same problem also. For configurable product if I set first time that product is out of stock and again move to stock system will not show product on frontend, show only info on frontend that product is out of stock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.6-p3 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

6 participants