When I'm importing products or creating categories Magento always automatically generates rewrite urls.
These rewrites are listed at Admin Backend -> Marketing -> URL Rewrites.
The category url I want:
www.example.com/store-view/category-name
What Magento 2 gives me after its autogenerated url rewrite:
www.example.com/store-view/catalog/category/view/s/category-name/id/4/
I know that I can get rid of the redirect by deleting it at Admin Backend -> Marketing -> URL Rewrites. However, I have hundreds of categories and thousands of products and there is no batch delete and I don't want to edit the database because this is unsafe and I would have to do it after each product import.
My questions are:
1. Why is Magento generating such wired urls?
2. How can I prevent autogenerated rewrite urls? Can I do this via config.xml or by writing a plugin (At this point of time I don't know the method that is responsible for autogenerating rewrite urls)?