I need to make changes to the product SEO Search engine friendly page name. it looks like that is the SLUG column in the urlrecord table. However a simple update to that table does not seem to take effect. There must be something else happening being the scenes. I have 1000 products and would like to update where the EntityName = 'Product' and Entityid = ? using SQL.
Whenever a new SEO name is entered into the UI, it creates a new record and sets it to IsActive = 1. Can I UPDATE this record using SQL and if not, what else is needed for an Update to take effect?
I need to make changes to the product SEO Search engine friendly page name. it looks like that is the SLUG column in the urlrecord table. However a simple update to that table does not seem to take effect. There must be something else happening being the scenes. I have 1000 products and would like to update where the EntityName = 'Product' and Entityid = ? using SQL.
Whenever a new SEO name is entered into the UI, it creates a new record and sets it to IsActive = 1. Can I UPDATE this record using SQL and if not, what else is needed for an Update to take effect?
Thanks so much.
Do you have more than one language configured on your site? If so, you'll also need to add that into your WHERE clause, otherwise, you'll update all languages at once.
If you add a new URL record(slug) that is identically named to another existing URL record, it doesn't actually UPDATE, but rather does an INSERT and appends a "-1" or "-2", etc.. to the slug. So you need to delete them first, or edit the existing entity with the already-used URL record so that you can re-appropriate it for another entity.
Also, since version 3.80, there is a slightly better interface for managing Slugs in the admin area. It now allows you to at least click a button to see which page is currently using that slug so you can change it before deleting it or re-appropriating it for a different entity: admin area >> System >> Search Engine Friendly Page Names
Thanks so much for that info. the DELETE first and then an INSERT did the trick. I only have one language all rows have a languageid of 0. I removed the row first
Delete from Urlrecord where Entityid = 1 and EntityName = 'Product' and isActive = 1 and Languageid = 0
Then did the insert
Insert into urlrecord (Entityid, Entityname, Slug, isActive, Languageid) VALUES (1,'Product','no-parking-fire-zone-signs',1,0)