We have a multi-store Magento 2.1.4 installation, with 3 stores, and in recent weeks we've noticed that our category URLs will some times include one of our store code's prepended with "-categories/" to all of our URLs.
Eg. az-categories/wheel-brake-tire/brake.html when it should be wheel-brake-tire/brake.html where az is the store code.
After investigating this further we discovered that any time we save a category the system generates more URLs like this.
It creates these URLs for each Store ID but only adds one Store Code to the URL. All stores will have a URL of az-categories/wheel-brake-tire/brake.html One row where store_id = 1
, another where store_id = 2
and a third where store_id = 3
.
We don't want this occurring on any of our sites.
We've disabled our custom extensions in our local environment and it still occurs. We also tried to prevent this by commenting out the Magento code in vendor/magento/module-catalog-url-rewrite/Model/CataegoryUrlRewriteGenerator.php
as a test but it still occurred.
Does anyone know how to resolve this so that the system no longer generates these extra URLS and returns our categories are back to normal?
Thanks.