When I try to remove the
.html suffix from category, Magento 2.2.0 gives me this error.
Has anyone else ran into the same problem? How can I resolve it?
This can be caused by duplicate entries for the same product in
url_rewrite database table.
You can follow the below steps to solve this issue:
Delete all records from table
url_rewrite. You can run the following SQL command:
DELETE FROM url_rewrite WHERE entity_type = 'product';
Login to your Magento 2 backend
Product URL Suffixin the
Adding to Mukesh's answer.
After i ran the suggested step from Mukesh to delete the url_rewrites, my products where then showing as a really long format:
and i wanted:
So i used the following extension to regenerate the url rewrites: https://github.com/olegkoval/magento2-regenerate_url_rewrites
Also ensure URl rewrites are on: Store > Configurations > General > Web > Search Engine Optimization and set Use Web Server Rewrites to Yes