how to UPDATE the SEO page name in URLRecord ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
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.
6 years ago
pfeighan wrote:
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

Hope this helps!
6 years ago
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)

and that SEO page name is now showing.

Thanks so much !!!
6 years ago
No problem! I'm happy to help.

By the way...it is good etiquette to click the little arrow button above the "0" to the right of any post that is helpful to you. ;-)
6 years ago
did not know that, :-) I do now. Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.