-
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
#22934 Improved sitemap product generation logic #23129
#22934 Improved sitemap product generation logic #23129
Conversation
…ies Path for Product URLs' is enabled
Hi @sergiy-v. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Just some thought here: We sometimes enable this "Use categories path for product urls" setting on certain shops, but also always enable "Use Canonical Link Meta Tag For Products". This means that for the end user he will see an url with categories while navigating the shop, but search engines will only care about the canonical url's. Those are url's without the category path. So if both of these settings are enabled, I would expect the sitemap to contain the canonical url's and not the url's with the category path. Can you double check if that is the case after this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sergiy-v,
Thank you for your contribution!
Please sign Contributor License Agreement.
Hi @Stepa4man, thank you for the review. |
Since this got approved without an answer to my question above, I just did some small testing. I'm not saying this will cause issues for SEO, but search engines would then have to go visit 2 product pages for every product (the first one from the sitemap, and the second when they find the canonical url on that first one and then discard the first one). Then a second issue I'm noticing is this case:
In this case, I would expect the product url in the sitemap to include the category path, just like it does on the frontend. But here the category path isn't part of the product url in the sitemap. |
@hostep very good points from your side and sorry for delay with answer. |
✔️ QA Passed |
@AlexWorking : before this PR gets merged, can you also check my comments above? Thanks! :) |
Hi, @sergiy-v, @hostep. Sorry for delay I've been on a small vacation. I was asked to recheck the issue of #4788 whether it is still reproducible or not. The recheck showed that the initial behavior described in the issue was not reproduced anymore by just following the steps given. Also I could not reproduce an updated by Valerii Naida behavior. But I detected another incorrect behavior (that was done by the way with Use Canonical Link Meta Tag For Products set to No). Therefore I closed #4788 and created #22934. That's all. Though hostep's arguments look logical enough, unfortunately I'm so to say not good enough an expert in those url rewrites and sitemappings:) So forgive me please but I don't dare to suggest, approve or disapprove something in the current situation. |
Thanks @AlexWorking for the answer! How should we proceed then here? The second case I brought up looks like a missing feature not being handled which is almost exactly the same as what this PR is trying to fix, so that one should get handled in this PR as well I assume? And the first case is something which needs to be discussed by people who understand more about SEO and what use cases |
@magento-cicd2 unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request |
1 similar comment
@magento-cicd2 unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request |
Hi @hostep. Seems I do agree with You, but these questions are better be addressed to a Product Owner, who I am not, at least yet)). |
@engcom-Bravo: ok, can you try to include a product owner in the discussion then please? Thanks! 🙂 |
I'll try @hostep, but can't guarantee it'll be already today. (Yes as You might have guessed I'm AlexWorking)) ) |
@hostep, I've just invited an architect on SEO Alex Paliarush @paliarush to join the discussion. |
Hi @sergiy-v, thank you for your contribution! |
Since this got merged without considering my comments, I created a follow up ticket: #23363 |
Description
Improved sitemap product generation logic for case when the 'Use Categories Path for Product URLs' is enabled.
If the 'Use Categories Path for Product URLs' is enabled the following URL generation logic for the product uses:
Fixed Issues
Manual testing scenarios (*)
Create two categories:
Create three simple products:
Case #1: the 'Use Categories Path for Product URLs' is enabled
Case #2: the 'Use Categories Path for Product URLs' is disabled
Contribution checklist (*)