File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
app/code/Magento/CatalogUrlRewrite/Model/Category/Plugin/Category Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,19 @@ public function afterChangeParent(
64
64
Category $ newParent ,
65
65
$ afterCategoryId
66
66
) {
67
+
68
+ $ categoryStoreId = $ category ->getStoreId ();
67
69
foreach ($ category ->getStoreIds () as $ storeId ) {
68
70
$ category ->setStoreId ($ storeId );
69
71
if (!$ this ->isGlobalScope ($ storeId )) {
70
72
$ this ->updateCategoryUrlKeyForStore ($ category );
73
+ $ category ->unsUrlPath ();
71
74
$ category ->setUrlPath ($ this ->categoryUrlPathGenerator ->getUrlPath ($ category ));
72
75
$ category ->getResource ()->saveAttribute ($ category , 'url_path ' );
73
76
$ this ->updateUrlPathForChildren ($ category );
74
77
}
75
78
}
79
+ $ category ->setStoreId ($ categoryStoreId );
76
80
77
81
return $ result ;
78
82
}
You can’t perform that action at this time.
0 commit comments