1
votes

Urls containing language information in the url ("filePath") opened normally in Sitecore 7.

For example, opening url "mysite.com/fr-ca" used to render an item with language fr-ca. Now, sitecore is displaying "item not found" page.

I have implemented a custom url provider. Is this causing issue?

I have changed "languageEmbedding" in hope that it works, but to no avail.

How can I fix this issue? As far as I remember this should work without issues as this functionality comes out of the box with sitecore.

1
Do you have a language item with name "fr-ca"? Do you maybe have some "encodeNameReplacements" enabled which replaces the "-" in some way? With a plain Sitecore 7 installation this should work out of the box, without configuring something. - Kevin Brechbühl
Maybe you could provide us your custom url provider implementation. - Bartłomiej Mucha

1 Answers

1
votes

The first thing to check is that your site has been published in the required language?

Publishing aside, it's difficult to know what the issue is here without seeing the code of your custom LinkProvider. If you were to use the standard Sitecore LinkProvider your settings should be similar to this (the key attributes to note here are languageEmbedding="always" and languageLocation="filePath"):

<linkManager defaultProvider="sitecore">
    <providers>
        <clear />
        <add name="sitecore" 
             type="Sitecore.Links.LinkProvider, Sitecore.Kernel" 
             addAspxExtension="false"
             alwaysIncludeServerUrl="false"
             encodeNames="true"
             languageEmbedding="always"
             languageLocation="filePath"
             shortenUrls="true"
             useDisplayName="false" />
    </providers>
</linkManager>