How to Apply Page Alias Change to All Children

Mike Bilz asked on January 2, 2020 23:48

Hello Kentico Team,

I recently changed the URLs to some of the higher level folders on my site, knowing that Kentico automatically creates aliases for those items as soon as the new URL is created. I had assumed that those changes would propagate down to all of the children and grandchildren of those changed folders, but this has not been the case. I am now dealing with a slew of broken links and 404 errors that will need to be corrected one at a time.

Is there any way for me to apply an alias to these children automatically, or as a batch?

Thanks in advance.

-mike

Recent Answers


Keio Kwan answered on January 3, 2020 09:33

Have you check your settings at: (URLs And SEO > Page URLs > Remember original URLs when moving pages)?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on January 3, 2020 10:02

Could you please describe what and where you have changed? Are you changing the Path or pattern value? Also, why don't you leave the original URL in place and add the new one as page alias to ensure the other links will still work? Or, even better from performance point of view would be using IIS URL Rewriting rules and do the redirection/URL rewrite before Kentico, on IIS.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on January 3, 2020 10:29

I assume this is a Portal Engine site?

How did you change the URL? In the Admin? Custom process? SQL?

Did you change the page name? Page Alias?

Check the URL settings in the Section Keio Kwan mentions!

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on January 3, 2020 19:02 (last edited on January 3, 2020 19:10)

Hello Everyone,

"Remember original URLs when moving pages" was active, but "Automatically update page alias" was not.

This is a portal site, yes. The change was made to the "Page Alias" field on the "URL" properties tab of each folder, and an alias was generated automatically.

The structure of my site looks like this:

  • Parent Directory (folder)
  • Child Directory (folder)
  • Page (Menu Item)
  • Child Page (Menu Item)

The alias change was made to the "Parent Directory" folder, but did not effect the child folders or pages.

Thanks,

-mike

0 votesVote for this answer Mark as a Correct answer

Mike Bilz answered on January 6, 2020 20:26

Hello Everyone,

I would really appreciate some help with this one. A new wrinkle, It looks like about half of the effected pages on the site DID create their own updated aliases. But that process seems to have stopped. I am not sure what I did to start that process, or to stop it, and there doesn't appear to be any record of when the aliases were created.

Is there something I can do to jump-start this process again? Would rebuilding my Smart Search directory be helpful, or changing some of the URL settings? Do the pages need to visited directly to stimulate the alias update?

I would really prefer not to update all of the pages and files manually.

Thanks in advance.

-mike

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on January 7, 2020 08:15

Smart search index does not have anything to do with the URLs so rebuilding it won't help. This could be very tricky as it may depend when and how the pages were created and what were the current settings for the URLs and SEO - many setting changes apply only to newly created pages after the setting change. So, we would need to know the "history" of the pages, settings at that time and what was changed after. I tried reproducing the issue but so far no luck. So, it looks like there were made some other changes either in the page's properties or in the settings. I also tried using the Use name path for URL path setting which automatically generates the Path or pattern value - which is the DocumentURLPath value in CMS_Document table. Isn't it possible that there were made also some changes to the Path or pattern value or was it set manually?
That being said, there is a chance that for some pages you will have to update the page aliases manually or, create a code snippet using the API for page aliases and updated them in some cycle.
But still, I am wondering whether you can reproduce the issue on a fresh Kentico instance. I have prepared a demo site http://us-03.kenticolab.com:10011/Hosted_trial_10504/ (administrator, no password) - could you please configure this instance in the same way as you have currently and try reproducing the issue?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.