Search code examples
umbracoumbraco6

Umbraco Same Url Render Page Sequence


I'm new to umbraco and using umbraco 6 latest version... Actually this is a silly mistake but makes me curious..

I've two content, let's say item a and item b.. This two item will be published alternately. so it can be access via "mysite/item_active"..

Today -> item a -> change name to item_active -> save publish -> change yesterday item active to item_b..

But somehow I forgot to use save publish yesterday.. And only click save that make the url of the content is not being updated..

Then how umbraco will choose with item to render (both item now have "mysite/item_active" url)?

The day I asked you is holiday until monday.. And I don't have access this site (because this internal company site) from home..

Are based on node? the smaller node is the one being render or the latest publish item will be rendered?


Solution

  • Umbraco won't allow you to save and publish two items with the same URL / node name (on the same tree level). It will automatically add version number e.g. (1) for the next node with the same name and then, friendly URL will become /mysite/item-active-1 in your case.

    I tested this scenario, and Umbraco returns this information when you're trying to publish item with the same name as existing one: enter image description here

    So, in theory - we have two items published, but only one is still in the XML (IPublishedContent) cache, from which Umbraco is taking content first. Second item won't be visible until we will change the URLs / names to be different or perform publish on first item and then scenario described at the beggining will be applied.

    Maybe it's worth to consider having it as a same page and just swaping the templates on which you can render particular properties values? Or having a content picker or something else to determine which version of the site should be marked as active and used?