I'm getting some strange behaviour when it comes to URLs for categories and products.
I have a category structure that looks like this;
Category 1>Sub Category 1>SubSub Category 1
>SubSub Category 2
I have Use Categories Path for Product URLs = Yes.
For SubSub Category 1, the URL is www.mydomain.com/Sub Category 1/SubSub Category 1
For SubSub Category 2, the URL is www.mydomain.com/Category 1/Sub Category 1/SubSub Category 2
The URL for SubSub Category 2 is fully qualified and would be what I'd expect. SubSub Category 1 was created prior to setting Use Categories Path for Product URLs and SubSub Category 2 was created after.
My question is; why are they different? If you're using the full path then it shouldn't matter when the category was created.
The other issue I'm seeing is when a product appears in a category that is an ascendant node in the heirarchy. Ie; not the category that the product is assigned to, but it's parent or ascendant. This is obviously only applicable when the category is an anchor category. Rather than seeing the product URL key and category path as the URL I'm seeing something that looks like this; http://www.mydomain.com/catalog/product/view/id/59/s/product-url-key/category/4/
Why is this happening? Both problems look tome like Magento is screwing up URL rewrites. As I understand it; Magento 1.x allowed you to recreate rewrites with a reindex. How can I fix this in Magento 2?