-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fixes problem with wrong image URL in sitemap #24605
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
Fixes problem with wrong image URL in sitemap #24605
Conversation
Problem was caused by wrong context of generation. It was adminhtml and for this area URL for selected image sizes are not defined (as those sizes are not defined). Fixed by using Emulation.
Hi @krisdante. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
FIxes #5321 |
Fixes #4511 |
Hi @kalpmehta, thank you for the review.
|
✔️ QA passed |
@krisdante Can you add automated tests please? |
Hi @krisdante, thank you for your contribution! |
@krisdante , It seems like it works when sitemap is manually generated, but when sitemap is generated by a scheduler it seems to still take placeholder image. Has this issue also been addressed? Thanks |
@manishmaharjan This is different piece of code. Please add a new issue. You can mention me there and I will fix it. |
It should, however, you can use the finally method, which will be executed each time.
|
Description (*)
Problem was caused by the wrong context of generation. It was adminhtml
and for this area URL for selected image sizes are not defined (as
those sizes are not defined).
Fixed by using Emulation and stwiched to Frontend area for Sitemap generation.
Fixed Issues (if relevant)
2.(indirectly) Images added to sitemap are "404 Not Found" on Nginx [Magento 2.1.0] #5321: Images added to sitemap are "404 Not Found" on Nginx [Magento 2.1.0]
3.(indirectly) XML Sitemap refers to non-watermarked images #4511: XML Sitemap refers to non-watermarked images
Manual testing scenarios (*)
It needs to be valid (not 404) and egual to url of large image from the storefront.
Questions or comments
Contribution checklist (*)