Error executing template "Designs/kibo/_parsed/espresso.parsed.cshtml"System.NullReferenceException: Object reference not set to an instance of an object.at CompiledRazorTemplates.Dynamic.RazorEngine_41078ffacc0c4e7491ee0d6f221cdb1d.Execute() in E:\Dynamicweb.NET\Solutions\Co3\kibo.espresso4.dk\Files\Templates\Designs\kibo\_parsed\espresso.parsed.cshtml:line 17at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 2 @using System.IO 3 @using System.Web 4 @using System.Globalization 5 @using Dynamicweb.Frontend 6 @using Dynamicweb.Ecommerce.Common 7 @using Dynamicweb.Security.UserManagement 8 @{ 9 bool isUserAuthenticated = User.IsExtranetUserLoggedIn(); 10 11 string globalAreaLang = PageView.Current().Area.CultureInfo.TwoLetterISOLanguageName; 12 CultureInfo currencyCulture = new CultureInfo( Context.Currency.CultureInfo ); 13 string currencySeparatorDecimal = currencyCulture.NumberFormat.NumberDecimalSeparator; 14 string currencySeparatorInteger = currencyCulture.NumberFormat.NumberGroupSeparator; 15 string openGraphUrl = PageView.Current().SearchFriendlyUrl; 16 string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage; 17 bool loadGoogleTagManager = !string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) && 18 !(Espresso.Area.Item.GoogleTagManagerDisableIfPerformanceTestIsDetected == "True" && HttpContext.Current.Request.UserAgent.ToLower().Contains( "lighthouse" )); 19 } 20 <!DOCTYPE html> 21 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal"> 22 <head> 23 <!-- Google Consent Mode --> 24 <script data-cookieconsent="ignore"> 25 window.dataLayer = window.dataLayer || []; 26 function gtag() { 27 dataLayer.push(arguments) 28 } 29 gtag("consent", "default", { 30 ad_storage: "denied", 31 analytics_storage: "denied", 32 functionality_storage: "denied", 33 personalization_storage: "denied", 34 security_storage: "granted", 35 wait_for_update: 500 36 }); 37 gtag("set", "ads_data_redaction", true); 38 gtag("set", "url_passthrough", true); 39 </script> 40 <!-- End Google Consent Mode--> 41 42 @if ( loadGoogleTagManager ) 43 { 44 <!-- Google Tag Manager --> 45 <script data-cookieconsent="ignore"> 46 (function(w, d, s, l, i) { 47 w[l] = w[l] || []; 48 w[l].push({ 49 'gtm.start': 50 new Date().getTime(), 51 event: 'gtm.js' 52 }); 53 var f = d.getElementsByTagName(s)[0], 54 j = d.createElement(s), 55 dl = l != 'dataLayer' ? '&l=' + l : ''; 56 j.async = true; 57 j.src = 58 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 59 f.parentNode.insertBefore(j, f); 60 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID'); 61 </script> 62 <!-- End Google Tag Manager --> 63 } 64 65 <script data-cookieconsent="ignore"> 66 window.dataLayer = window.dataLayer || []; 67 function gtag(){ dataLayer.push(arguments); } 68 gtag('consent', 'default', { 69 ad_personalization: "denied", 70 ad_storage: "denied", 71 ad_user_data: "denied", 72 analytics_storage: "denied", 73 functionality_storage: "denied", 74 personalization_storage: "denied", 75 security_storage: "granted", 76 wait_for_update: 500, 77 }); 78 gtag('set', 'ads_data_redaction', true); 79 </script> 80 81 @GetValue( "CopyRightNotice" ) 82 <meta charset="utf-8"> 83 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"> 84 <meta content="ie=edge" http-equiv="x-ua-compatible"> 85 <title>@GetValue("Title")</title> 86 @Espresso.CriticalCSS 87 @RenderSnippet( "webfonts" ) 88 <link href="/Files/Templates/Designs/kibo/_assets/_dist/css/default.css" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 89 @Espresso.CriticalJS 90 <link href="https://cdnjs.cloudflare.com" rel="preconnect"> 91 <link href="https://www.googletagmanager.com" rel="preconnect"> 92 <link href="https://www.google-analytics.com" rel="preconnect"> 93 <link href="https://connect.facebook.net" rel="preconnect"> 94 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon"> 95 @GetValue( "MetaTags" ) 96 @if ( Espresso.IsStagingUrl ) 97 { 98 <meta content="noindex,nofollow" name="robots"> 99 }100 <meta property="og:url" content="@openGraphUrl">101 <meta property="og:title" content="@Espresso.OpenGraphTitle">102 <meta property="og:description" content="@Espresso.OpenGraphDescription">103 <meta property="og:image" content="@openGraphImage">104 <meta property="og:type" content="website">105 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false )106 {107 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification">108 }109110111 </head>112113 <body class="@Espresso.Item.CustomClasses" data-is-user-authenticated="@isUserAuthenticated.ToString().ToLower()" data-design="@Espresso.Area.DesignsFolderName">114 @if ( loadGoogleTagManager )115 {116 <!-- Google Tag Manager (noscript) -->117 <noscript>118 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe>119 </noscript>120 <!-- End Google Tag Manager (noscript) -->121 }122 @using Co3.Espresso.Website.Models.FrontEnd123 @using Co3.Espresso.Website.Models.FrontEnd.Settings124 @using Co3.Espresso.Website.Services125 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase126 @{127 Espresso.Canvas.Classes.AddClasses( "js-e-canvas is-loading" );128 if ( Espresso.Item.CanvasFullscreen == "True" )129 {130 Espresso.Canvas.Classes.AddClasses( "is-fullscreen" );131 }132 }133134135136137 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">138 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" )139 </div>140141 @RenderingService.Instance.PartialView( "_partials/webfonts.cshtml", Espresso )142143 <div class="@Espresso.Canvas.Classes">144 @RenderingService.Instance.PartialView( "_partials/header.cshtml", Espresso )145 @RenderingService.Instance.PartialView( "usermanagement/viewprofile/espresso-impersonate-user-msg.cshtml", Espresso )146 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.Classes">147 @RenderingService.Instance.PartialView( "_partials/breadcrumb.cshtml", Espresso )148 <article class="e-content-article">149 @RenderingService.Instance.PartialView( "_partials/nav-local-horizontal.cshtml", Espresso )150 @RenderingService.Instance.PartialView( "_partials/nav-local-vertical.cshtml", Espresso )151 @RenderingService.Instance.SectionStart( new SectionSettings() )152 @GetValue("DwContent(dwcontentmain)")153 @RenderingService.Instance.SectionEnd()154 </article>155 </main>156157 @RenderingService.Instance.PartialView( "_partials/footer.cshtml", Espresso )158159 @if ( !string.IsNullOrEmpty( GetString( "DwContent(dwcontentcta)" ) ) )160 {161 <aside class="e-cta fixed-top is-hidden js-e-cta" id="dwcontentcta">162 @RenderingService.Instance.SectionStart( new SectionSettings163 {164 ContentClasses = new ClassList( "col-12" ),165 OuterRowClasses = new ClassList("row no-gutters"),166 InnerRowClasses = new ClassList("row no-gutters justify-content-center align-items-center")167 } )168 @GetValue("DwContent(dwcontentcta)")169 @RenderingService.Instance.SectionEnd()170171 </aside>172 }173174 </div>175176 @RenderingService.Instance.PartialView( "_partials/search.cshtml", Espresso )177178 @RenderingService.Instance.PartialView( "_partials/back-to-top.cshtml", Espresso )179 @RenderingService.Instance.PartialView( "cookiewarning/espresso.cshtml", Espresso )180181 @if ( 1 == 2 )182 {183 @GetValue("DwCookieWarning")184 }185186 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/kibo/_assets/_dist/js/default.js?v=1.1"></script>187 </body>188189 @GetValue( "CopyRightNotice" )190 </html>191