1

Closed

NiceURLs doesn't work for language with empty "URL mapping name" property

description

How to reproduce:
  1. Consider C1 site with multiple languages( e.g. English and Danish)
  2. One of the languages(usually default language) can have empty "URL mapping name" property (for example, English).
    Danish language has "URL mapping name" = de
    So C1 URLs e.g. to the home page will be like this:
    English: http://localhost/home.aspx
    Danish: http://localhost/de/home.aspx
  3. Enable NiceURLs
NiceURLs will not work correctly for English language. (but if English language also has "URL mapping name" , e.g 'en', then it works as expected)
Closed May 6, 2011 at 8:47 AM by
Fixed in changeset 66594

comments

burningice wrote May 5, 2011 at 6:33 PM

Well, its kinda by design since good SEO practice dictates that you should always indicate the language in the url, unless there is one and only one language. It should be easy to fix though, by making a check in CompositeC1SiteMapNode.cs line 55 whether the current language-mapping is empty or not.

burningice wrote May 5, 2011 at 8:01 PM

In the latest commit i've made some changes to how i treat Url Mappings. Where i before made the assumption that 1 locale = no mapping, > 1 locale = mapping for each locale i know conservatively check for mapping for each locale, no matter how many locales are installed and act accordingly. I've tested with a site that has to locales but only one mapping and it works fine. Can you please confirm.

Inna wrote May 6, 2011 at 7:56 AM

Yes, It works now fine. Thanks!