Sequence contains no matching element (Multisite issue)
I have a setup whereby I have two "Home" nodes, one for an English site the other for a German website. Each have there own Cultures/Languages set appropiately.
In one partial view I have the below code snippet:
@foreach (var branch in Umbraco.TypedContentAtRoot().Where(x => x.DocumentTypeAlias == Homepage.ModelTypeAlias))
{
var culture = branch.GetCulture();
var region = new RegionInfo(culture.Name);
<option value="@branch.Url" @(Model.CurrentCulture.Name == culture.Name ? "selected=\"true\"" : "")>@region.EnglishName (@culture.Name)</option>
}
The English site: Run pefectly and the dropdown of sites is populated with the above code.
However... the German website errors on this sames code. I've stepped through it and the data in the loop is identical, but after looping through the two sites, it throws this error:
System.InvalidOperationException: 'Sequence contains no matching element'
Has anyone ever had a similiar issue to this or have an idea of what could be going wrong. Thanks.
Sequence contains no matching element (Multisite issue)
I have a setup whereby I have two "Home" nodes, one for an English site the other for a German website. Each have there own Cultures/Languages set appropiately.
In one partial view I have the below code snippet:
The English site: Run pefectly and the dropdown of sites is populated with the above code.
However... the German website errors on this sames code. I've stepped through it and the data in the loop is identical, but after looping through the two sites, it throws this error:
Has anyone ever had a similiar issue to this or have an idea of what could be going wrong. Thanks.
is working on a reply...