Skip to content

partially backported MAGETWO-83560 : Fixes issue with generating 301 rewrite when changing product URL key on Storeview level #13906

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

Closed
wants to merge 4 commits into from

Conversation

duckchip
Copy link
Contributor

@duckchip duckchip commented Mar 1, 2018

Description

Backport of MAGETWO-83560 for 2.1.x projects.
Fixes issue with generating 301 redirect when changing product URL key on Storeview level

Fixed Issues (if relevant)

  1. Magento don't create product redirect if URL key on store view level was changed. #10073: Magento don't create product redirect if URL key on store view level was changed.
  2. Permanent 301 redirect is not generated when product url changes on storeview scope #13240: Permanent 301 redirect is not generated when product url changes on storeview scope

Manual testing scenarios

  1. ... Change Product url key on storeview level
  2. ... Check Url Rewrites table for the correct rewrites

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)

@duckchip duckchip changed the title partially backported MAGETWO-83560 : Fixes issue with generating 301 redirect when changing product URL key on Storeview level partially backported MAGETWO-83560 : Fixes issue with generating 301 rewrite when changing product URL key on Storeview level Mar 1, 2018
@rogyar rogyar self-assigned this Mar 1, 2018
@rogyar
Copy link
Contributor

rogyar commented Mar 1, 2018

Hello @duckchip. Thank you for your contribution. Please, consider porting the integration tests that were developed for checking this issue within a scope of #13567 as well

In that way, we will have the complete backport and will be able to check the functionality.

Thanks

@@ -205,13 +205,6 @@ public function testExecuteUrlKey(
->method('getIsChangedCategories')
->will($this->returnValue($isChangedCategories));

$this->urlPersist->expects($this->exactly($expectedDeleteCount))->method('deleteByData')->with([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should remove $expectedDeleteCount variable (parameter) from the function as well since it's unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @rogyar
Thanks for your review, I really appreciate it! 👍
Backporting tests always give me headaches 😄 I hope they run smoothly through travis now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, fix the mentioned issue via a new commit. After that the tests will be executed once again.

@rogyar
Copy link
Contributor

rogyar commented Mar 18, 2018

@duckchip are you going to proceed with this PR?

@duckchip duckchip closed this Mar 31, 2018
@duckchip
Copy link
Contributor Author

Closed because of failing integration tests

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.

3 participants