Skip to content

Fixed #20282 Module Catalog Url Rewrite: Permanent Redirect for old URL is missed when product was imported #20344

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class AfterImportDataObserver implements ObserverInterface
'url_path',
'name',
'visibility',
'save_rewrites_history'
];

/**
Expand Down Expand Up @@ -199,6 +200,7 @@ public function __construct(

/**
* Action after data import.
*
* Save new url rewrites and remove old if exist.
*
* @param Observer $observer
Expand Down Expand Up @@ -267,6 +269,8 @@ protected function _populateForUrlGeneration($rowData)
}

/**
* Add store id to product data.
*
* @param \Magento\Catalog\Model\Product $product
* @param array $rowData
* @return void
Expand Down Expand Up @@ -436,6 +440,8 @@ protected function currentUrlRewritesRegenerate()
}

/**
* Generate url-rewrite for outogenerated url-rewirte.
*
* @param UrlRewrite $url
* @param Category $category
* @return array
Expand Down Expand Up @@ -470,6 +476,8 @@ protected function generateForAutogenerated($url, $category)
}

/**
* Generate url-rewrite for custom url-rewirte.
*
* @param UrlRewrite $url
* @param Category $category
* @return array
Expand Down Expand Up @@ -503,6 +511,8 @@ protected function generateForCustom($url, $category)
}

/**
* Retrieve category from url metadata.
*
* @param UrlRewrite $url
* @return Category|null|bool
*/
Expand All @@ -517,6 +527,8 @@ protected function retrieveCategoryFromMetadata($url)
}

/**
* Check, category suited for url-rewrite generation.
*
* @param \Magento\Catalog\Model\Category $category
* @param int $storeId
* @return bool
Expand Down