Magento 2 fixing product urls
Sometimes even though you have placed a product url in Magento Admin, it doesn't show on the frontend. Instead you see a URL like this
To fix product url - perform the following steps
On the database you view specific entries for that url using the following sql statements:
* FROM `url_rewrite` WHERE `target_path` LIKE '%4729%'
SELECT * FROM `catalog_product_entity_varchar` WHERE `value` LIKE '%57642-beu%'
In Magento 2 Admin do the following
Open the product in admin and add 1 to url ( uncheck Create Permanent Redirect for old URL )
Open the product in admin again and remove the 1 you added to the url in previous step ( uncheck Create Permanent Redirect for old URL )
Run the first query above and you will notice 4 more records for a specific store_id you’re using.