Skip to content
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

Fix sitemap grid render incorrect base urls for multiple stores #18000

Merged
merged 1 commit into from
Sep 24, 2018
Merged

Conversation

nntoan
Copy link
Contributor

@nntoan nntoan commented Sep 10, 2018

Description

In Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php, we've created new instance for \Magento\Sitemap\Model\Sitemap. That lead to $sitemap->getStoreId() is NULL all the time, the sitemap.xml generated still using correct store id because of we load $sitemap instance from the collection which retrieve data directly from the database.

So to fix this issue, we should set the store id for the current sitemap object based on store id retrieved from the current row.

Fixed Issues (if relevant)

  1. Sitemap grid display incorrect base URL in the grid if using multiple stores #17999: Sitemap grid display incorrect base URL in the grid if using multiple stores

Manual testing scenarios

  1. Setup multiple store views with different base urls, (default config base url must be different with all other store view base url)
  2. Go to Marketing > SEO & Search > Site Map
  3. Check if Actual Result in Sitemap grid display incorrect base URL in the grid if using multiple stores #17999 does not happen. It suppose to display something like this:
    screenshot from 2018-09-10 17-04-44

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-cicd2
Copy link
Contributor

magento-cicd2 commented Sep 10, 2018

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @nntoan. 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 {$VERSION} instance - deploy vanilla Magento instance

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

@nntoan
Copy link
Contributor Author

nntoan commented Sep 10, 2018

@magento-engcom-team give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @nntoan. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @nntoan, here is your new Magento instance.
Admin access: https://pr-18000.engcom.dev.magento.com/admin
Login: admin Password: 123123q

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

@nntoan thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team
Copy link
Contributor

Hi @nntoan. Thank you for your contribution.
We will aim to release these changes as part of 2.2.8.
Please check the release notes for final confirmation.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

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