Object must be of type String.

Server Error in '/' Application.

Object must be of type String.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Object must be of type String.

Source Error:


Line 384:							try
Line 385:							{
Line 386:								row = rows.OrderByDescending(item => item["AliasCulture"]) /* Seřadíme podle AliasCulture, aby invariant byl až na konci */
Line 387:									.ThenBy(item => item["AliasPriority"]) /* dál podle priority, která je při nejmenším zmatečná. */
Line 388:									.FirstOrDefault(item => ((string)item["AliasCulture"]).Equals(CMS.CMSHelper.CMSContext.PreferredCultureCode, StringComparison.InvariantCultureIgnoreCase)

Source File: c:\Havit\BontiaWeb\App_Code\Havit\Navigation\ListMenu.cs    Line: 386

Stack Trace:


[ArgumentException: Object must be of type String.]
   System.String.CompareTo(Object value) +164
   System.Linq.EnumerableSorter`2.CompareKeys(Int32 index1, Int32 index2) +123
   System.Linq.EnumerableSorter`1.QuickSort(Int32[] map, Int32 left, Int32 right) +157
   System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count) +135
   System.Linq.<GetEnumerator>d__1.MoveNext() +185
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +124
   Havit.Navigation.ListMenu.GetItems(Int32 parentNodeId, Int32 indentLevel) in c:\Havit\BontiaWeb\App_Code\Havit\Navigation\ListMenu.cs:386

[ApplicationException: Node ID: 2062, 
	<ul id="menuElem">
		<li>]
   Havit.Navigation.ListMenu.GetItems(Int32 parentNodeId, Int32 indentLevel) in c:\Havit\BontiaWeb\App_Code\Havit\Navigation\ListMenu.cs:393
   Havit.Navigation.ListMenu.ReloadData(Boolean forceLoad) in c:\Havit\BontiaWeb\App_Code\Havit\Navigation\ListMenu.cs:607
   Havit.Navigation.ListMenu.OnInit(EventArgs e) in c:\Havit\BontiaWeb\App_Code\Havit\Navigation\ListMenu.cs:554
   System.Web.UI.Control.InitRecursive(Control namingContainer) +454
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Control.InitRecursive(Control namingContainer) +219
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1719


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4667.0