Skip to content

[Backport]-issue-195196 Images in XML sitemap are always linked to base store in multistore on Schedule#21220

Closed
Nazar65 wants to merge 1 commit intomagento:2.2-developfrom
Nazar65:backport-195196
Closed

[Backport]-issue-195196 Images in XML sitemap are always linked to base store in multistore on Schedule#21220
Nazar65 wants to merge 1 commit intomagento:2.2-developfrom
Nazar65:backport-195196

Conversation

@Nazar65
Copy link
Copy Markdown
Member

@Nazar65 Nazar65 commented Feb 14, 2019

Original PR #19598

Description (*)

Images in XML sitemap are always linked to base store in multistore on Schedule

Fixed Issues (if relevant)

  1. Images in XML sitemap are always linked to base store in multistore on Schedule  #19596: Images in XML sitemap are always linked to base store in multistore on Schedule
  2. ...

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 (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @Nazar65. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Copy Markdown
Contributor

Hi @sivaschenko, thank you for the review.
ENGCOM-4264 has been created to process this Pull Request

@Nazar65
Copy link
Copy Markdown
Member Author

Nazar65 commented Feb 28, 2019

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

protected function _loadProductImages($product, $storeId)
this $this->_storeManager->setCurrentStore($storeId);

In 2.2-develop "i was tested" and this issue does not exist because they use deprecated method collectSitemapItems

public function collectSitemapItems()

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 ?

@sivaschenko
Copy link
Copy Markdown
Member

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.

@Nazar65
Copy link
Copy Markdown
Member Author

Nazar65 commented Mar 1, 2019

@sivaschenko thanks, i'm closing this PR.

@Nazar65 Nazar65 closed this Mar 1, 2019
@ghost
Copy link
Copy Markdown

ghost commented Mar 1, 2019

Hi @Nazar65, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants