1

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.

2
  • 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. Commented Jul 19, 2013 at 9:02
  • 1
    Maybe you could provide us your custom url provider implementation. Commented Jul 19, 2013 at 10:23

1 Answer 1

1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.