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

Fixes issues with url rewrites created on shop with multiple storeviews #7667

Closed
wants to merge 5 commits into from

Conversation

hostep
Copy link
Contributor

@hostep hostep commented Dec 2, 2016

We have a project where we import a bunch of categories and products programmatically.
And after that we let the url rewrites being created as this doesn't seem to happen automatically.

In Magento 2.1.2, there are problems in the category urls when we do this, where the url's use the url_key from the category data from store id 0 (admin values) instead of from the specific storeview we try to generate the url rewrites for.

This PR fixes our issues.

Possibly related to #4112 and #2619

…d when utilizing the url rewrite functionality programmatically.
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Dec 2, 2016

CLA assistant check
All committers have signed the CLA.

@comdiler
Copy link

comdiler commented Dec 2, 2016

Looks like integration tests are not working. Access denied for user 'root'@'localhost' (using password: NO)
I believe we should wait while it get's fixed :-(

@hostep
Copy link
Contributor Author

hostep commented Dec 5, 2016

I just updated the PR, my initial commit started giving problems when saving a category in the backend which then threw URL key for specified store already exists. exceptions.
This PR might now also be related to #6671

Would be great if this PR can get some extensive testing, because I'm not total sure if this won't have negative effects elsewhere.

@hostep hostep changed the title Fixes wrong url rewrites created on shop with multiple storeviews when executing url rewrites programmatically Fixes issues with url rewrites created on shop with multiple storeviews Dec 5, 2016
@hostep
Copy link
Contributor Author

hostep commented Dec 8, 2016

And added a third commit for yet another issue we ran into.
I'm still very unsure about these changes ...

Also: I know the CI tests fail, but I only tested these changes on 2.1.2 and not on the develop branch, I just copied the changes into the new ProductScopeRewriteGenerator.php file, since the logic was moved there from the ProductUrlRewriteGenerator which was being used in 2.1.2

…fix it...", it seems to be doing more bad then good...

This reverts commit 159f12c.
hostep referenced this pull request Jan 14, 2017
…t-UrlRewriteMap-develop-final

MAGETWO-58924 - Url rewrite map table lock
@hostep
Copy link
Contributor Author

hostep commented Feb 2, 2017

I'm giving up on this, the fixes are never 100% correct in all different cases in which url rewrites can be generated.

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.

5 participants