Exception in template (Designs/WeberGrill/_parsed/frontpage.parsed.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(GroupCollection groups, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(GroupCollection groups, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(Page page, NavigationItem parentNode, Boolean applyStartAndEndLevelToNavigation)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.Process(NavigationItem node, Boolean applyStartAndEndLevelToNavigation)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.Process(NavigationItem node, Boolean applyStartAndEndLevelToNavigation)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.ProcessTree(RootNavigationItem rootNode, NavigationType navigationType)
   at Dynamicweb.Frontend.XmlNavigation.XML(Int32 ParentID, Int32 StartLevel, Int32 StopLevel, Expand expand, Int32 areaID)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(Int32 ParentID, Int32 StartLevel, Int32 StopLevel, Expand ExpandMode, String NavigationName, String XsltPath, Int32 AreaID, Boolean SitemapMode, NameValueCollection settings, NameValueCollection attributes, IncludeMode mode)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)
   at Dynamicweb.Rendering.RazorTemplateBase`1.RenderNavigation(Object settings)
   at CompiledRazorTemplates.Dynamic.bfddaadebcd.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System.Text.RegularExpressions @using System.Web @using NORRIQ.Common8.Razor; @using WeberDK.Extensions @using WeberDK.Razor; @using WeberDK.Services @{ var AreaID = GetString("DwAreaID"); var lang = GetGlobalValue("Global:Area.Culture.CountryCode"); var user = GetGlobalValue("Global:Extranet.UserName"); var ogurl = GetGlobalValue("Global:Request.Scheme") + "://" + GetGlobalValue("Global:Request.Host") + GetGlobalValue("Global:Pageview.Url"); var title = GetString("Title"); if (title == "") { title = GetString("DwPageName"); } title = Regex.Replace(title, @"<[^>]+?>|\\r|\\n", "", RegexOptions.Singleline).Trim(); var renderTitleSnippet = GetGlobalValue("Global:Pageview.Url").Contains("itemID") || GetGlobalValue("Global:Pageview.Url").Contains("shareproduct"); } <!DOCTYPE html> <html lang="@lang"> <head> @if(1 == 2) // Stupid dynamicweb hack to avoid that they override the values { <title>@GetValue("Title")</title> <meta property="og:title" content="hejsa"> } <title>@title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> @GetString("MetaTags") @if (HttpContext.Current.Request.QueryString["itemID"] != null || HttpContext.Current.Request.QueryString["shareproduct"] != null) { var ogTitle = RenderSnippet("newstitle"); // Somehow throwing this value in ogTitle first works but directly does not <meta property="og:title" content="@ogTitle"> } else { <meta property="og:title" content="@title"> } <meta property="og:url" content="@System.Text.RegularExpressions.Regex.Replace(ogurl, @" ($[razor_001]$)[^="">]+?>|\\r|\\n", "", RegexOptions.Singleline).Trim()" /> @RenderSnippet("facebook") <link rel="shortcut icon" href="/Files/Templates/Designs/WeberGrill/css/favicon.ico"> @WeberDK.Razor.TimestampSource.GetStyleWithTimestamp("/Files/Templates/Designs/WeberGrill/css/webergrill.min.css", "all") @WeberDK.Razor.TimestampSource.GetStyleWithTimestamp("/Files/Templates/Designs/WeberGrill/css/weber-team.css", "all") @WeberDK.Razor.TimestampSource.GetStyleWithTimestamp("/Files/Templates/Designs/WeberGrill/css/print.css", "print") <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> @RenderItemList(new { ItemType = "Country", ListSourceType = "Area", ListSourceArea = @AreaID, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/country.cshtml", ListPageSize = 100, ListOrderBy = "Sort", IncludeParagraphItems = true }) <nav class="navbar navbar-inverse hidden-xs" id="top" role="navigation"> <div class="container"> <ul class="topmenu"> @RenderNavigation(new { Template = "top_navigation.xslt", Expandmode = "all" }) @if (user == "") { <li> <a href="@Navigation.GetUrlByNavigationTag(" user-grill-create")"="" class="topa"> @Translate("toplink_userGrillRegister", "Register grill") </a> </li> <li> <a class="btn-primary" href="@Navigation.GetUrlByNavigationTag(" user-view")"="" class="hiBg"> @Translate("weberID_LinkLogIn", "Login") </a> </li> if (GetString("Ecom:Order.OrderLines.TotalProductQuantity") != "0") { <li id="minicartspares" class="mini dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <span class="fa fa-shopping-cart"></span> (@GetString("Ecom:Order.OrderLines.TotalProductQuantity")) </a> @{ var cart_link = @GetString("Item.Area.CartPage"); } <div class="dropdown-menu dropdown-menu-right dropdown-menu-custom" aria-labelledby="minicartspares"> <table class="table table-condensed"> <tbody> <tr> <td> @Translate("label_items_in_basket", "Items") </td> <td class="ar"> @GetString("Ecom:Order.OrderLines.TotalProductQuantity") </td> </tr> <tr> <td> @Translate("label_cart_total", "Cart total") </td> <td class="ar"> @GetString("Ecom:Order.Price.Price") </td> </tr> </tbody> </table> <a href="@cart_link" class="btn btn-primary btn-block">@Translate("label_show_cart", "Show cart")</a> </div> </li> } } else { <li class="dropdown" id="weberid"> <a href="@Navigation.GetUrlByNavigationTag(" user-view")"="" class="btn-primary dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> @Translate("weberID_LinkUserArea", "WeberID") </a> <div class="dropdown-menu dropdown-menu-right dropdown-menu-custom" role="menu" aria-label="weberid"> <!--@Navigation.Render(template:user_navigation.xslt;expandmode:all;)--> <a href="javascript:location.href='/admin/public/extranetlogoff.aspx?'" class="btn btn-default"> @Translate("logoffLink", "Log out") </a> </div> </li> <li id="minicartspares" class="mini dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <span class="fa fa-shopping-cart"></span> (@GetString("Ecom:Order.OrderLines.TotalProductQuantity")) </a> @{ var cart_link = @GetString("Item.Area.CartPage"); } <div class="dropdown-menu dropdown-menu-right dropdown-menu-custom" aria-labelledby="minicartspares"> <table class="table table-condensed"> <tbody> <tr> <td> @Translate("label_items_in_basket", "Items") </td> <td class="ar"> @GetString("Ecom:Order.OrderLines.TotalProductQuantity") </td> </tr> <tr> <td> @Translate("label_cart_total", "Cart total") </td> <td class="ar"> @GetString("Ecom:Order.Price.Price") </td> </tr> </tbody> </table> <a href="@cart_link" class="btn btn-primary btn-block">@Translate("label_show_cart", "Show cart")</a> </div> </li> } </ul> </div> </nav> <nav class="navbar navbar-default" role="navigation"> <div class="container"> <div class="row" id="head"> @if (GetString("DwPageID") == GetString("DwAreaID")) { <h1 class="col-md-2 col-sm-2 col-xs-5"> @{ var logoTitle = @Translate("the_grill_the_original", "The Grill. The Original."); } <a href="<!--@Navigation.GetUrlByNavigationTag(home)-->" id="logo" title="Weber @logoTitle"> <span class="logo"><img src="/Files/Templates/Designs/WeberGrill/css/logoWeberBig.png" alt="Weber logo" class="img-responsive"></span> <span class="company">Weber</span> <span class="slogan">@Translate("the_grill_the_original", "The Grill. The Original.")</span> </a> </h1> } else { <div class="col-md-2 col-sm-2 col-xs-5"> @{ var logoTitle = @Translate("the_grill_the_original", "The Grill. The Original."); } <a href="<!--@Navigation.GetUrlByNavigationTag(home)-->" id="logo" title="Weber @logoTitle"> <span class="logo"><img src="/Files/Templates/Designs/WeberGrill/css/logoWeberBig.png" alt="Weber logo" class="img-responsive"></span> <span class="company">Weber</span> <span class="slogan">@Translate("the_grill_the_original", "The Grill. The Original.")</span> </a> </div> } <div class="col-xs-7 visible-xs button-container"> @using System.Web @using NORRIQ.Common8.Razor @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <div class="btn-toolbar pull-right"> <div class="btn-group"> <a href="#" id="countrylink" class="consel btn btn-icon"> <span class="short-lang"> @lang </span> </a> </div> <div class="btn-group"> <button id="weberid" class="btn btn-icon" data-toggle="dropdown" role="button"> <span class="fa fa-user"> </span> <span class="btn-icon-text"> Weber-ID </span> </button> <div class="dropdown-menu dropdown-menu-right dropdown-menu-custom" aria-label="weberid"> <!--@If Not Defined(Global:Extranet.UserName)--> <!--@Navigation.Render(template:user_navigation.xslt;expandmode:all;)--> <a href="<!--@Navigation.GetUrlByNavigationTag(user-view)-->" class="btn btn-primary btn-block"> @Translate("weberID_LinkLogIn", "Login") </a> <!--@EndIf--> <!--@If Defined(Global:Extranet.UserName)--> <!--@Navigation.Render(template:user_navigation.xslt;expandmode:all;)--> <a href="javascript:location.href='/admin/public/extranetlogoff.aspx?'" class="btn btn-default btn-block"> @Translate("logoffLink", "Log out") </a> <!--@EndIf--> </div> </div> <!--@If(Ecom:Order.OrderLines.TotalProductQuantity>'0')--> <div class="btn-group"> <button id="minicartspares" class="btn btn-icon" data-toggle="dropdown" role="button"> <span class="count"> <!--@Ecom:Order.OrderLines.TotalProductQuantity--> </span> <span class="fa fa-shopping-cart"></span> <span class="btn-icon-text">Kurv</span> </button> <div class="dropdown-menu dropdown-menu-right dropdown-menu-custom" aria-labelledby="minicartspares"> <table class="table table-condensed"> <tbody> <tr> <td> @Translate("label_items_in_basket", "Items") </td> <td class="ar"> <!--@Ecom:Order.OrderLines.TotalProductQuantity--> </td> </tr> <tr> <td> @Translate("label_cart_total", "Cart total") </td> <td class="ar"> <!--@Ecom:Order.Price.Price--> </td> </tr> </tbody> </table> <a href="<!--@Item.Area.CartPage-->" class="btn btn-primary btn-block">Vis kurv</a> </div> </div> <!--@EndIf--> <div class="btn-group"> <button class="btn btn-icon navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".drop-navigation"> <span class="fa fa-bars"></span> </button> </div> </div> </div> @RenderNavigation(new { Template = "drop_navigation_boot.xslt", Expandmode = "all" }) </div> </div> </nav> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System.Web @using NORRIQ.Common8.Razor; @using WeberDK.Razor; <div id="bigslide-animation" class="clearfix">@GetValue("DwContent(bigslideanimation)")</div> <div class="container"> <div class="row"> <div id="content" class="col-md-12">@GetValue("DwContent(content)")</div> </div> </div> <div id="ph03" class="widey">@GetValue("DwContent(ph03)")</div> <script append="true"> require(['webergrill/areas/frontpage'],function(frontpage) { frontpage.init(); }); </script> <footer id="foot" class="clearfix"> <div class="container footnav"> <div class="row"> <nav class="col-md-9" role="navigation"> @RenderNavigation(new { Template = "foot_navigation.xslt", ExpandMode = "all" }) </nav> @{ var socialParagraphId = NORRIQ.Common8.ObjectFactory.GetInstance<ParagraphService>().GetParagraphId("global-elements", "social");} @if (socialParagraphId.HasValue) { @RenderParagraphContent(socialParagraphId.Value) } </div> </div> <div class="black"> <div class="container"> <nav role="navigation" class="row"> @RenderItemList(new { ItemType = "Foot_Menu", ListSourceType = "Area", ListSourceArea = @AreaID, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/footer.cshtml", ListPageSize = 100, IncludeParagraphItems = true }) <p> &copy; @Translate("copyright", "Copyright Weber-Stephen Nordic 2014. All rights reserved") </p> </nav> </div> </div> </footer> @if (GetBoolean("NIQ:JavaScriptDebug")) { <script src="/scripts/require.js"></script> @WeberDK.Razor.TimestampSource.GetJavaScriptWithTimestamp("/scripts/webergrill/main.js") } else { @WeberDK.Razor.TimestampSource.GetJavaScriptWithTimestamp("/scripts/webergrill/main.min.js") } <script> require(['translations'], function(translations) { translations.set('validation', { required: '@Translate("validator_required", "This field is required.")', remote: '@Translate("validator_remote", "Please fix this field.")', email: '@Translate("validator_email", "Please enter a valid email address.")', url: '@Translate("validator_url", "Please enter a valid URL.")', date: '@Translate("validator_date", "Please enter a valid date.")', dateISO: '@Translate("validator_dateISO", "Please enter a valid date (ISO).")', number: '@Translate("validator_number", "Please enter a valid number.")', digits: '@Translate("validator_digits", "Please enter only digits.")', creditcard: '@Translate("validator_creditcard", "Please enter a valid credit card number.")', equalTo: '@Translate("validator_equalTo", "Please enter the same value again.")', maxlength: '@Translate("validator_maxlength", "Please enter no more than {0} characters.")', minlength: '@Translate("validator_minlength", "Please enter at least {0} characters.")', rangelength: '@Translate("validator_rangelength", "Please enter a value between {0} and {1} characters long.")', range: '@Translate("validator_range", "Please enter a value between {0} and {1}.")', max: '@Translate("validator_max", "Please enter a value less than or equal to {0}.")', min: '@Translate("validator_min", "Please enter a value greater than or equal to {0}.")', currentPassword: '@Translate("validation_incorrectCurrentPassword", "Incorrect current password")', usernNameAllreadyInUse: '@Translate("validation_userNameAllreadyInUse", "Username was already in use")' }); translations.set('days', { sunday: "@Translate("Sunday", "Sunday")", monday: "@Translate("Monday", "Monday")", tuesday: "@Translate("Tuesday", "Tuesday")", wedensday: "@Translate("Wednesday", "Wednesday")", thursday: "@Translate("Thursday", "Thursday")", friday: "@Translate("Friday", "Friday")", saturday: "@Translate("Saturday", "Saturday")" }); translations.set('mapbearing', { "N": "@Translate("Compass_N", "N")", "NE": "@Translate("Compass_NE", "NE")", "E": "@Translate("Compass_E", "E")", "SE": "@Translate("Compass_SE", "SE")", "S": "@Translate("Compass_S", "S")", "SW": "@Translate("Compass_SW", "SW")", "W": "@Translate("Compass_W", "W")", "NW": "@Translate("Compass_NW", "NW")" }); require(['webergrill/areas/master'], function (master) { master.init(); }); }); </script> <script append="replace"></script> <script> var _gaq = _gaq || []; _gaq.push(['_setAccount', '@GetString("Item.Area.GoogleCode")']); _gaq.push(['_trackPageview']); (function () { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> @GetString("Item.Area.BottomScripts") </body> </html>