After upgrading to Magento 2.3.1 from 2.3.0, Category URL Rewrite don’t seem to be working

After upgrading to Magento 2.3.1 from 2.3.0, Category URL Rewrite don’t seem to be working.

After the update, now when I am creating a new product, the URL that’s being generated is something like this: http://example.com/catalog/product/view/id/3708/s/test-product-1/. The correct format should have been http://example.com/mobile-spare-parts/test-product-1/.

My settings are as follows:

  • Configuration >> General >> Web >> Search Engine Optimization >> Use Web Server Rewrites: Yes
  • Configuration >> Catalog >> Search Engine Optimization >> Use Categories Path for Product URLs: Yes
  • Configuration >> Catalog >> Search Engine Optimization >> Use Canonical Link Meta Tag For Categories: No
  • Configuration >> Catalog >> Search Engine Optimization >> Use Canonical Link Meta Tag For Products: Yes

What seems to be working though is, after creating a product, if I go and change the category to some other category, & save the product again, the URL re-write seems to be happening.

Again if I revert back to the original category, even now the URL re-write seems to be working with Clean URL being generated.