Köp för 600 SEK och få fri leverans!

Köp för 600 SEK och få fri leverans!

MENU
0
Exception in template (Designs/Robens/Paragraph/ArticleRibbonItem.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.afeefbeccabd.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 290
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using Dynamicweb.Extensibility; @using Dynamicweb.Frontend; @using Dynamicweb.Rendering; @using OaseOutdoors.Components.Shared.Paragraphs.ArticleRibbon.ModelBuilders @using OaseOutdoors.Services.ImageService.Enums @inherits ViewModelTemplate<ParagraphViewModel> @{ var viewModelService = new ArticleRibbonViewModelBuilder(); var viewModel = viewModelService.GetViewModel(Model); } <section class="article container-ribbon ribbon"> <div class="container"> @if (!string.IsNullOrEmpty(viewModel.Headline)) { <h1>@viewModel.Headline</h1> } @if (viewModel.Image != null) { <img class="@viewModel.ImagePosition.ToLower()" src="@viewModel.Image.SetWidth(1260).SetCompression(80).SetCrop(CropType.KeepAspectRatio).GetCrop()" alt="@viewModel.ImageAltText" title="@viewModel.ImageAltText" /> } @if (!string.IsNullOrEmpty(viewModel.SubHeadline)) { <div class="article__content"><h2>@viewModel.SubHeadline</h2></div> } @if (!string.IsNullOrEmpty(viewModel.BodyText)) { <div class="article__content">@viewModel.BodyText</div> } @viewModel.ParagraphModule </div> </section>
Exception in template (Designs/Robens/Paragraph/HeroRibbonItem.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at OaseOutdoors.Services.ImageService.ImageService.AddImage() in C:\projects\oase\src\Services\ImageService\ImageService.cs:line 93
   at OaseOutdoors.Services.ImageService.ImageService.Begin(String imageFile) in C:\projects\oase\src\Services\ImageService\ImageService.cs:line 25
   at OaseOutdoors.Components.Shared.Paragraphs.HeroRibbon.ModelBuilders.HeroRibbonViewModelBuilder.GetViewModel(ParagraphViewModel entity) in C:\projects\oase\src\Components\Shared\Paragraphs\HeroRibbon\ModelBuilders\HeroRibbonModelBuilder.cs:line 29
   at CompiledRazorTemplates.Dynamic.effabcedaadbecf.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 290
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using Dynamicweb.Extensibility; @using Dynamicweb.Frontend; @using Dynamicweb.Rendering; @using OaseOutdoors.Components.Shared.Paragraphs.HeroRibbon.ModelBuilders @using OaseOutdoors.Services.ImageService.Enums @using OaseOutdoors.Services.StaticResourceService.Initialization @inherits ViewModelTemplate<ParagraphViewModel> @{ var viewModelService = new HeroRibbonViewModelBuilder(); var staticResourceService = ServiceLocator.Current.GetStaticResourceService(); var viewModel = viewModelService.GetViewModel(Model); var className = ""; var backgroundImage = ""; } @if (viewModel.Image != null) { className += " hero--has-image"; backgroundImage = " " + "data-src-xxs='" + @viewModel.Image.SetWidth(940).SetHeight(400).SetCrop(CropType.Center).SetCompression(50).SetAlternativeImage().GetCrop() + "'" + "data-src-xs='" + @viewModel.Image.SetWidth(1514).SetHeight(600).SetCrop(CropType.Center).SetCompression(50).SetAlternativeImage().GetCrop() + "'" + "data-src-sm='" + @viewModel.Image.SetWidth(1962).SetHeight(850).SetCrop(CropType.Center).SetCompression(50).SetAlternativeImage().GetCrop() + "'" + "data-src-md='" + @viewModel.Image.SetWidth(1142).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'" + "data-src-lg='" + @viewModel.Image.SetWidth(1462).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'" + "data-src-xl='" + @viewModel.Image.SetWidth(1762).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'" + "data-src-xxl='" + @viewModel.Image.SetWidth(2483).SetHeight(790).SetCrop(CropType.Center).SetCompression(70).SetAlternativeImage().GetCrop() + "'"; } <section class="ribbon hero"> <div class="hero__content container-fluid lazy-bg@(className)"@(backgroundImage)> <div class="container"> @if (!string.IsNullOrEmpty(viewModel.BodyText)) { <div class="hero__text">@viewModel.BodyText</div> } @if (!string.IsNullOrEmpty(viewModel.CallToActionLink)) { <div class="hero__cta"> <a href="@viewModel.CallToActionLink" class="btn btn--big btn--filled btn--bg"><span class="btn__text">@viewModel.CallToActionLinkTitle</span></a> </div> } </div> </div> </section>

Customer Service

How can we help you?

Product - Faqs

FAQ - Products

Webshop - FAQs

FAQ - Webshop