Open ioweb-gr opened 2 months ago
Hi @ioweb-gr. 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:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: 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.
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: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @ioweb-gr,
Thanks for the report and collaboration!
We have checked this scenario and found that this is a valid issue, the products
query cannot fetch out-of-stock products due to the collection's filtering logic. This behavior differs from the traditional Magento frontend behavior where the product page for an out-of-stock product can still be accessed via a direct URL.
This limitation affects SEO because indexed direct URLs to out-of-stock products result in a 404 error, which is detrimental to SEO.
Hence confirming the issue.
Thanks
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12315 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@engcom-Hotel Hi, and thanks for confirming the issue. Do you think you could reach with the team and see what would be acceptable as a solution? Like a high level example of how it would work?
Preconditions and environment
Steps to reproduce
The problem that we're trying to solve is that we can't get the original behavior of magento with out of stock products.
The existing behavior of magento is that this product won't be visible in collections, but it will be visible on the product page if you access it by a direct URL.
On the PWA using graphql we can only use the
products
query in conjunction with theurlResolver
.When a user access the direct URL, we use
urlResolver
to fetch the product ID successfully e.g.When we try to fetch the product from the products query with the id it's not fetching it because in the underlying code, a collection is loaded which automatically is flagged to remove out of stock products.
Thus the product cannot be displayed resulting in 404.
This problem is very important for SEO
We need a way to replicate the original behavior of magento to fetch the product data by it's ID via graphQL and then display it as out of stock.
Expected result
The product is fetched by the graphql query by it's ID
Actual result
The product is filtered out because it's out of stock.
Additional information
Keep in mind, we don't want to show all out of stock products everywhere, we just need to retain the functionality of showing the product when it's hit by an indexed direct URL in Google.
IF there's any workaround, could you inform us what it is or what we're doing wrong?
I don't see a path to replicating this functionality currently.
Release note
No response
Triage and priority