[Backport]-issue-195196 Images in XML sitemap are always linked to base store in multistore on Schedule#21220
[Backport]-issue-195196 Images in XML sitemap are always linked to base store in multistore on Schedule#21220Nazar65 wants to merge 1 commit intomagento:2.2-developfrom Nazar65:backport-195196
Conversation
|
Hi @Nazar65. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
|
Hi @sivaschenko, thank you for the review. |
|
HI @sivaschenko after hour of debugging i'm found why this not proper work on 2.3-develop, so i decided, that we dont need to use Environment emulation we just need to add in this$this->_storeManager->setCurrentStore($storeId);
In 2.2-develop "i was tested" and this issue does not exist because they use deprecated method wich have the same $this->_storeManager->setCurrentStore($storeId);and in 2.3-develop this method no uses any more, and we have new one wich forgot to set storeId when load a collection. Do we need to remove Enviroument emulation and add this missed line on 2.3-develop ? |
|
Hi @Nazar65 you are right, the issue was fixed on 2.2 in 8e426fe Yes, I believe that approach is straight and clear and also looks better from the performance and point of view, it would be good to adjust the functionality on 2.3-develop accordingly! Considering that the issue is fixed on 2.2-develop, I believe this backport can be closed. |
|
@sivaschenko thanks, i'm closing this PR. |
|
Hi @Nazar65, thank you for your contribution! |
Original PR #19598
Description (*)
Images in XML sitemap are always linked to base store in multistore on Schedule
Fixed Issues (if relevant)
Manual testing scenarios (*)
Website URL 1: https://my_website.com
Website URL 2: https://my_website.co.uk
Got to Stores->Configuration->Catalog->XML Sitemap->General Settings:
2.Set to Enable, Start Time, Frequency Daily etc...
TIP: I've set to a few minutes before checking!
Website 1 should have images url referencing Website 1 domain = https://my_website.com
Contribution checklist (*)