Eros eros Posted February 12 Share Posted February 12 Hi, i have many product that have in Friendly url this value 'friendly-url-autogeneration-failed' but the product name is present and also well formed, why? This issue does not affect all products in my catalog but also affects some products, but I have not understood the cause. Isn't there a way to automatically regenerate them? Link to comment Share on other sites More sharing options...
ComGrafPL Posted February 12 Share Posted February 12 Have you tried with simple turn of / turn on friendly url? Link to comment Share on other sites More sharing options...
Eros eros Posted February 12 Author Share Posted February 12 Yes, without effects Link to comment Share on other sites More sharing options...
Eros eros Posted February 12 Author Share Posted February 12 No news? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 13 Share Posted February 13 Hi, This issue occurs when PrestaShop fails to generate a valid friendly URL for some products, often due to invalid characters. To fix this, first, ensure that "Friendly URLs" is enabled in Shop Parameters > Traffic & SEO, then edit and re-save affected products in Catalog > Products to regenerate their URLs. If products are affected, regenerate their URLs with this PHP script: foreach (Db::getInstance()->executeS("SELECT id_product, name FROM ps_product_lang WHERE link_rewrite = 'friendly-url-autogeneration-failed'") as $p) { Db::getInstance()->execute("UPDATE ps_product_lang SET link_rewrite = '".Tools::link_rewrite($p['name'])."' WHERE id_product = ".(int) $p['id_product']); }Kindly include the correct detail in place of 'friendly-url-autogeneration-failed' in the above query. After updating, clear the cache from Advanced Parameters > Performance and reindex the database to apply changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now