I'm trying to save category from admin panel but not able to save parent category, it fire error :: Something went wrong while saving the category.
-
Refresh the page and try to save it again.– Krishna ijjadaDec 2, 2016 at 9:08
-
Remove var folder from root and login again– Rakesh JesadiyaDec 2, 2016 at 9:09
-
i've tried with refreshing page and tried but not working @kri– YogeshDec 2, 2016 at 13:36
-
i've removed var folder and pub folder also and regenerate but still not :( @Rakesh– YogeshDec 2, 2016 at 13:36
2 Answers
I Found Solution, Override below file app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php
https://github.com/magento/magento2/issues/4430
and Replace the foreach loop with the following on line no - 94:
foreach ($urls as $url) {
$urlArray = $url->toArray();
$urlPath = $urlArray['request_path'];
$storeId = $urlArray['store_id'];
$dataKey = $storeId.'..'.$urlPath;
$data[$dataKey] = $urlArray;
}
I also had this problem when was trying to save category with a huge amount of products. Try to switch "Store View" to some store (not "All store views") on the top of category admin page and then select a category to save it. It should help