2

I have product XYZ and URL key for this product is www.mysite.com/xyz

I have updated the value of URL key product from xyz to xyz-new.

When I try to access url www.mysite.com/xyz-new. It gives me 404 error.

I have noticed that product url_key is updated correctly, but url_path is not updating.

Is this known issue in magento 2.1.x?

Any solution for this?

7
  • Have update manually? Commented Aug 23, 2018 at 12:14
  • yes. I have edited a product from backend and updated it manually for url key..
    – 1990rk4
    Commented Aug 23, 2018 at 12:15
  • have you tried after reindex
    – kunj
    Commented Aug 23, 2018 at 12:19
  • yes ... I have already did this.. but it doesnt work for me
    – 1990rk4
    Commented Aug 23, 2018 at 12:19
  • make sure xyz- new it's not taking space between Commented Aug 23, 2018 at 12:37

3 Answers 3

0

Try with www.mysite.com/xyz-new.html

If not working check the Product URL suffix in

Store > Configuration > Catalog > Catalog > Search Engine Optimization > Product URL Suffix

Try clearing cache.

5
  • This field is blank on my site... there is no value
    – 1990rk4
    Commented Aug 23, 2018 at 12:17
  • I hope you did Reindex
    – Gagan
    Commented Aug 23, 2018 at 12:18
  • yes ... I have already did this
    – 1990rk4
    Commented Aug 23, 2018 at 12:19
  • Check db if URL rewrites updated. If not updated then take backup of url-rewrite table. And truncate and save all the products again(if it is possible)
    – Gagan
    Commented Aug 23, 2018 at 12:29
  • In db its not updated..... there are 1490 products... saving all product again is definitely not good idea.. and not even good solution
    – 1990rk4
    Commented Aug 23, 2018 at 12:41
0

url_path is deprecated, and could safely delete its data. I tested it in my Magento 2.1.18.

You could see the deprecated statement in the offical github comment

0

Try with the

Clear Cache: Clear the Magento cache to ensure that the new URL key is properly recognized. php bin/magento cache:clean php bin/magento cache:flush

Reindex: Reindex the Magento indexers to ensure that the URL rewrite index is up to date. php bin/magento indexer:reindex

Check Database for Duplicates: Ensure there are no duplicate entries for the same URL key in the database. Run a query to check for duplicate URL keys in the url_rewrite table:- SELECT * FROM url_rewrite WHERE request_path = 'your-new-url-key';

Debug Logs: Check the Magento logs for any errors or warnings that might give more insight into the issue. tail -f var/log/system.log tail -f var/log/exception.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.