Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > Renaming a parent doesn't alter the document url path of its children? View modes: 
User avatar
Member
Member
Josh Larios - 9/28/2009 6:28:14 PM
   
Renaming a parent doesn't alter the document url path of its children?
My site has two pages, /foo and /foo/bar. Both have been published.

I go to the Form tab for /foo, check it out and change its document name to "quux", then save, check in and publish.

If I look at the properties for "bar", I now have:

Alias path: /foo/bar
Name path: /quux/bar
Live URL: /foo/bar
Document URL path: /foo/bar

If I go back and edit "quux" so that its Document alias is "quux" instead of "foo" (because changing its document name doesn't change its document alias, apparently), then the properties for "bar" are:

Alias path: /quux/bar
Name path: /quux/bar
Live URL: /foo/bar
Document URL path: /foo/bar

But if I want the Live URL and Document URL path for "bar" to change, I have to edit "bar", check "use custom URL path", uncheck "use custom URL path", and then save. (No check in/out or publish is required.) After that sequence, the properties for "bar" are:

Alias path: /quux/bar
Name path: /quux/bar
Live URL: /quux/bar
Document URL path: /quux/bar

In the simple case, when "quux" (formerly "foo") only has one child, it's no big deal. When I'm changing a page which has multiple children, each of which can have multiple children, it's a serious hassle to have to check and un-check that box and save for every single document under the one which changed.

So, two questions:

1) Why doesn't changing the document name also change the document alias? If I wanted a document alias different from the document name, I could add one using "Add new alias", or I could enable the "Remember original URLs when moving documents" setting.

2) Why don't changes to the URL path propagate down to children? Surely, moving a section of a web site around shouldn't necessitate manual intervention on every single document in that section, should it?


User avatar
Member
Member
Josh Larios - 9/28/2009 6:51:41 PM
   
RE:Renaming a parent doesn't alter the document url path of its children?
Forgot to mention:

We're not using permanent URLs, and we don't have "remember original URLs when moving documents" enabled. We are using extensionless URLs.

Version: 4.1 Build: 4.1.3541

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 10/6/2009 3:43:56 AM
   
RE:Renaming a parent doesn't alter the document url path of its children?
Hi Josh,

This is by-design behavior. It is implemented this way for keeping the
old links working even after document is renamed. You could optionally use Custom TreeNode handler to write custom code that will change the URL of all children documents if you change any document's name. Please see TreeNode Handler and Event handling overview sections of DevGuide for
more details.

Best Regards,

Martin Dobsicek

User avatar
Member
Member
Josh Larios - 10/6/2009 10:49:17 AM
   
RE:Renaming a parent doesn't alter the document url path of its children?
As I said in our email thread, I am astonished.

I can see how you would want to keep the old URLs working (but then I question what the point of the "Remember original URLs when moving documents" setting is). But I don't understand how it can possibly be the desired behavior for child not to inherit a new URL, even though it has a new location in the content tree. When I rename /parent to /renamed, /renamed/child should be a valid URL--it's the child page's "name path", and I have the "use name path for URL path" option enabled. In what circumstances would someone want to rename a section of their site and have only the top level page get a new URL?

Anyway, we seem to have a solution that works for us (after hacking around a different problem with linked documents), so I'll consider this issue closed. Broken-by-design, but closed.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 10/16/2009 4:09:47 AM
   
RE:Renaming a parent doesn't alter the document url path of its children?
Hi Josh,

Could you please make sure the 'Use custom URL path' check box is unchecked for document and it's children? If not so, could you please uncheck it (+save changes)? There should appear the name path of current document in 'Document URL path' then and the URL based on name path should work as well.

Best Regards,

Martin Dobsicek

User avatar
Member
Member
andrew-tod - 7/27/2012 8:04:12 AM
   
RE:Renaming a parent doesn't alter the document url path of its children?
Hi

Any improvements with this with v5.5R2 - or do I have to wait to upgrade? I've got a similar problem expect I have 1000's of child documents!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/30/2012 6:51:24 AM
   
RE:Renaming a parent doesn't alter the document url path of its children?
Hi,

You need to set the "Use name path for URL path" setting to true for your web site in Site Manager -> Settings -> URLs and SEO configuration.

Best regards,
Juraj Ondrus