Getting fall-back content when no fall-back language is enabled

Vote:
 

The site host is mapped to en-IE and I've set en-IE to have no fall-back language and saved.

Is there anything else I need to do? I am getting Hungarian content on screen. Other languages seem to be functioning as expected. 

#49002
Feb 28, 2011 12:58
Vote:
 

Edit: I believe it is showing MASTER content, not Hungarian. 

#49003
Feb 28, 2011 13:51
Vote:
 

A page in EPiServer is first created in the master language and all non global properties are saved on that page. Then all properties that are global are saved on the the different language versions of the page. So if you have non globalized properties they will be shown in the master language what ever you do.

#49007
Feb 28, 2011 14:14
Vote:
 

"Unique value per language" is marked as Yes for each and every property in our pages, if that is what you mean?

#49008
Feb 28, 2011 14:21
Vote:
 

Yes that was what I meant. That means that it shouldn't take any values from the master page unless there is a fallback in there somewhere. So if you leave all properties empty (except name) do you then get the master language property values?

#49009
Feb 28, 2011 14:23
Vote:
 

I missed one key point - I'm referring to the text on links to pages that are not published!

#49011
Feb 28, 2011 15:13
Vote:
 

To add to that, if I browse to a page that is not published for the current language, I still get the page with Master content, even though there is no fall-back set.

Can I turn this off?

#49012
Feb 28, 2011 16:27
Vote:
 

No you can't turn this off what I know of. This is by design in this version of CMS. Normally this isn't a problem as you wouldn't show links to other languages because you filter the links with whatever language the user is currently on. They never see the links, they have to manually type them in.

#49014
Feb 28, 2011 16:54
Vote:
 

A work-around:

if (EPiServer.Globalization.ContentLanguage.GetLanguageFromHost() != "en" && CurrentPage.IsMasterLanguageBranch)
                Response.Redirect("/");
    

 

#49017
Feb 28, 2011 17:57
Vote:
 

Hi Peter!

There's a bug which i think was fixed between CMS 6 and 6 R2 which would return the master language version of the page when trying to load a language that did not exist or was not published. Sounds like this might be the case. Should be fixed by upgrading to R2 when thats released.

Regards
Linus Ekström

#49022
Mar 01, 2011 6:54
Vote:
 

sorry to pickup this old thread, but I'm seeing this in R2 too.

was this bug confirmed and fixed in R2?

#58408
Apr 24, 2012 10:34
Vote:
 

Yes, it was fixed quite some while ago so the fix should should be included in CMS6 R2. Please contact support if you are still experiencing this.

#58424
Apr 25, 2012 8:15
Vote:
 

the following piece of code can help:

if (!string.Equals(LanguageSelection.GetLanguageFromHost(), currentPage.LanguageID,
                               StringComparison.InvariantCultureIgnoreCase) &&
                !isLanguageFallbackset)
            {
                Response.StatusCode = 404;
                Server.Transfer("/404.aspx", false);
            }

bool isLanguageFallbackset = GetFallbackLanguageId(CurrentPageLink);

 

public bool GetFallbackLanguageId(PageReference pageToCheck)

        {

            PageLanguageSetting pageLS;

                pageLS = PageLanguageSetting.Load(pageToCheck, LanguageSelection.GetLanguageFromHost());

            if (pageLS != null)

            {

                if (pageLS.LanguageBranchFallback.Length > 0)

                    return true;

            }

            return false;

        }

#71323
May 15, 2013 15:29
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.