Error executing template "Designs/progressive/_parsed/espresso.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_5cc744426433412db35277723c5b0909.Execute() in E:\Dynamicweb.NET\Solutions\co3\progressive.espresso5.dk\Files\Templates\Designs\progressive\_parsed\espresso.parsed.cshtml:line 17
at 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.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
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 Co3.Espresso.Website.Services 6 @using Dynamicweb.Frontend 7 @using Dynamicweb.Ecommerce.Common 8 @using Dynamicweb.Security.UserManagement 9 @{ 10 bool isUserAuthenticated = User.IsExtranetUserLoggedIn(); 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 <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-culture="@globalAreaLang" data-cbid="817f9507-4ec3-4307-909f-6eb1f30177e7" data-blockingmode="auto" type="text/javascript"></script> 24 @GetValue( "CopyRightNotice" ) 25 <meta charset="utf-8"> 26 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"> 27 <meta content="ie=edge" http-equiv="x-ua-compatible"> 28 <link href="https://cdnjs.cloudflare.com" rel="preconnect"> 29 <link href="https://www.googletagmanager.com" rel="preconnect"> 30 <link href="https://www.google-analytics.com" rel="preconnect"> 31 <link href="https://connect.facebook.net" rel="preconnect"> 32 <title>@GetValue("Title")</title> 33 @Espresso.CriticalCSS 34 @RenderingService.Instance.PartialView( "_partials/webfonts.cshtml", Espresso ) 35 <link href="/Files/Templates/Designs/progressive/_assets/_dist/css/default.css?v0.91" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 36 @Espresso.CriticalJS 37 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon"> 38 <meta name="description" content="@Espresso.DynamicwebPage.Description"> 39 @GetValue( "MetaTags" ) 40 @if ( Espresso.IsStagingUrl ) 41 { 42 <meta content="noindex,nofollow" name="robots"> 43 } 44 <meta property="og:url" content="@openGraphUrl"> 45 <meta property="og:title" content="@Espresso.OpenGraphTitle"> 46 <meta property="og:description" content="@Espresso.OpenGraphDescription"> 47 <meta property="og:image" content="@openGraphImage"> 48 <meta property="og:type" content="website"> 49 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ) 50 { 51 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification"> 52 } 53 @if ( loadGoogleTagManager ) 54 { 55 <!-- Google Tag Manager --> 56 <script data-cookieconsent="ignore"> 57 (function(w, d, s, l, i) { 58 w[l] = w[l] || []; 59 w[l].push({ 60 'gtm.start': 61 new Date().getTime(), 62 event: 'gtm.js' 63 }); 64 var f = d.getElementsByTagName(s)[0], 65 j = d.createElement(s), 66 dl = l != 'dataLayer' ? '&l=' + l : ''; 67 j.async = true; 68 j.src = 69 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 70 f.parentNode.insertBefore(j, f); 71 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID'); 72 </script> 73 <!-- End Google Tag Manager --> 74 } 75 <script data-cookieconsent="ignore" src="https://unpkg.com/@('@')lottiefiles/lottie-player@('@')latest/dist/lottie-player.js"></script> 76 <script data-cookieconsent="ignore" src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.7.13/lottie.min.js" integrity="sha512-srGxQe2w7s50+5/nNgEVKYtBm15zRylJwdjxYnGEZr3mmHFJKFjA/ImA2OKizVzoIDX8XISMHDI1+az9pnumbQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> 77 </head> 78 79 <body class="@Espresso.Item.CustomClasses" data-is-user-authenticated="@isUserAuthenticated.ToString().ToLower()" data-design="@Espresso.Area.DesignsFolderName"> 80 @if ( loadGoogleTagManager ) 81 { 82 <!-- Google Tag Manager (noscript) --> 83 <noscript> 84 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe> 85 </noscript> 86 <!-- End Google Tag Manager (noscript) --> 87 } 88 @using Co3.Espresso.Website.Models.FrontEnd 89 @using Co3.Espresso.Website.Models.FrontEnd.Settings 90 @using Co3.Espresso.Website.Services 91 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 92 @{ 93 Espresso.Canvas.Classes.AddClasses( "js-e-canvas is-loading" ); 94 if ( Espresso.Item.CanvasFullscreen == "True" ) 95 { 96 Espresso.Canvas.Classes.AddClasses( "is-fullscreen" ); 97 } 98 } 99100101102 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay"> 103 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 104 </div> 105106 <div class="@Espresso.Canvas.Classes"> 107 @RenderingService.Instance.PartialView( "_partials/header.cshtml", Espresso ) 108 @RenderingService.Instance.PartialView( "usermanagement/viewprofile/espresso-impersonate-user-msg.cshtml", Espresso ) 109 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.Classes"> 110 @RenderingService.Instance.PartialView( "_partials/breadcrumb.cshtml", Espresso ) 111 <article class="e-content-article"> 112 @RenderingService.Instance.PartialView( "_partials/nav-local-horizontal.cshtml", Espresso ) 113 @RenderingService.Instance.PartialView( "_partials/nav-local-vertical.cshtml", Espresso ) 114 @RenderingService.Instance.SectionStart( new SectionSettings() ) 115 @GetValue("DwContent(dwcontentmain)") 116 @RenderingService.Instance.SectionEnd() 117 </article> 118 </main> 119120 @RenderingService.Instance.PartialView( "_partials/footer.cshtml", Espresso ) 121122 @if ( !string.IsNullOrEmpty( GetString( "DwContent(dwcontentcta)" ) ) ) 123 { 124 <aside class="e-cta fixed-top is-hidden js-e-cta" id="dwcontentcta"> 125 @RenderingService.Instance.SectionStart( new SectionSettings 126 { 127 ContentClasses = new ClassList( "col-12" ), 128 OuterRowClasses = new ClassList("row no-gutters"), 129 InnerRowClasses = new ClassList("row no-gutters justify-content-center align-items-center") 130 } ) 131 @GetValue("DwContent(dwcontentcta)") 132 @RenderingService.Instance.SectionEnd() 133134 </aside> 135 } 136137 </div> 138139 @RenderingService.Instance.PartialView( "_partials/search.cshtml", Espresso ) 140141142 @if ( 1 == 2 ) 143 { 144 @GetValue("DwCookieWarning") 145 } 146147 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/progressive/_assets/_dist/js/default.js?v=1.3"></script> 148 </body> 149150 @GetValue( "CopyRightNotice" ) 151 </html> 152