-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
refs #10725 removing and creating url rewrites #10939
Conversation
Przemek Siwik seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
@psiwik please address this issue from CLA tool (seems like you did some commits with the wrong email or something)
|
@psiwik can you please accept CLA? We would not be able to accept the PR before you do that. Also, please fix issues in the static tests. Other than that, the contribution passed QA and looks great. |
* @return \Magento\UrlRewrite\Service\V1\Data\UrlRewrite[] | ||
*/ | ||
public function generate(Product $product, $rootCategoryId = null) | ||
public function generate(Product $product, $rootCategoryId = null,$storeId = null) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add space after comma
foreach ($stores as $storeId) { | ||
$visible = $productResource->getAttributeRawValue($productId,'visibility',$storeId); | ||
if (in_array($visible,$siteVisibilities)) { | ||
$this->urlPersist->replace($this->productUrlRewriteGenerator->generate($product,null,$storeId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add spaces after commas
@psiwik Please let us know if you have time to resolve static tests failures and finish this PR. Apply Magento coding standards as described in
Make reafcroting of
|
Hi @psiwik thank you for your contribution. Unfortunately we can not accept this PR without signed CLA and with broken tests. |
Fix an issue #10725
Description
This problem concerns not only visibility. This bug appears when we changed product category, url_key and website. When we saving the product from admin (default store view) magento try to remove urls from product->storeId = 0. In the database there are no such entries. From the other side, when we want to change categories after save we should to remove and rebuild all urls (category is global attribute), but when admin is set to a specific store, magento rebuilds only links for this store. It's not a good idea to get storeId from product to rebuild url rewrites.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist