Hello,
I tried to change the Product URL Suffix and Category URL Suffix from “.html” to empty. When I try to do that I got the following message:
Something went wrong while saving this configuration: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘eiken-haardhout-0-5-kuub-2’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’, query was: UPDATE `url_rewrite` SET `request_path` = ? WHERE (`url_rewrite_id` = 1294)
when I look at rewrites, there I see there is number 1062 and 1294. There is a complete range of rewrites missing?
What to do?
regards,
Albert
-
it must be "I DON'T see number 1062 and 1294.
5 answers
Hi Albert,
it must be “I DON’T see number 1062 and 1294.
Number 1062 is error code only.
Duplicate entry ‘eiken-haardhout-0-5-kuub-2’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’, query was: UPDATE `url_rewrite` SET `request_path` = ? WHERE (`url_rewrite_id` = 1294)
That issue because the data migrated from your Magento1 database has some duplicate of url_path. I raise conflict with new working rules of Magento2.
Let’s try with step as below:
Open your Terminal, go to your Magento2 folder and run command:
php -f bin/ubdatamigration fixduplicateurl
And clean your Magento 2 cache: php -f bin/magento cache:flush
And tell me know how it goes.
Regards,
Mall.
Hi Mall,
Now I get this error:
Something went wrong while saving this configuration: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘brandpunten-2’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’, query was: UPDATE `url_rewrite` SET `request_path` = ? WHERE (`url_rewrite_id` = 914)
regards,
Albert
Hi Albert,
So, please try with steps as bellow:
Step 1: Backup current your Magento2 database.
Step 2: Delete all records from table url_rewrite by SQL comamd: Delete From url_rewrite
Step 3: Come back to back-end of your M2 and then re-save all your Categories.
And clean the Magento2 cache.
And tell me know how it goes.
Regards,
Mall.
I could save the prefix. Now there are no rewrites at all. Now I get the categary number and so on in my url.
regards,
Albert
It is working now and I’ve clear rewrites list!
This question is now closed