Here is my question with supporting screenshots (let me know if you think I’ve overlooked anything obvious):
We have a Magento 2 multisite setup, with categories set up like so
Our issue is that when editing some (but not all) of these categories, in different store views, Magento throws the following error and does not save the data:
In this case, the name of the “Supplements” category was edited in the Chinese store view. It shows the changed value of the name in this view but refreshing the page show that it is not saved at all.
Editing the same category in the default store view does not result in the same issue
Ensuring that the “Default” checkbox is unchecked for the url key field in the Chinese store view makes no difference
We have tried removing url rewrites for this category (based on the error message and other posts we have reviewed) but this does not help.
We are running M2 Community 2.1.5.
Traced the issue back to a db save error in the url rewrite table:
SQLSTATE: Integrity constraint violation: 1062 Duplicate entry '90-3' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT INTO `url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`store_id`,`entity_type`,`entity_id`,`request_path`,`target_path`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?,