Error executing template "/Designs/exhibition_site/Paragraph/vocast-pressreleases.cshtml"
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Co3.MCH.Website.Frontend.Services.VocastService.GetContent(VocastConfig config) in C:\Data\Development\git\mch-master\Co3.MCH.Website.Frontend\Services\VocastService.cs:line 156
at Co3.MCH.Website.Frontend.Services.VocastService.GetPressreleases(Area area, Boolean forceReload) in C:\Data\Development\git\mch-master\Co3.MCH.Website.Frontend\Services\VocastService.cs:line 69
at Co3.MCH.Website.Frontend.Services.VocastService.GetPressReleases() in C:\Data\Development\git\mch-master\Co3.MCH.Website.Frontend\Services\VocastService.cs:line 110
at CompiledRazorTemplates.Dynamic.RazorEngine_e3f05bd35b444690a2a688b59237e8e3.Execute() in E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\Paragraph\vocast-pressreleases.cshtml:line 43
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.Paragraphs.ImageTextTopBottom 2 @using Co3.Espresso.Base.Extensions; 3 @using Co3.Espresso.Website.Models.FrontEnd.Settings 4 @using Co3.Espresso.Website.Services 5 @using System.Web 6 @using Dynamicweb.Frontend 7 @using Co3.MCH.Website.Frontend.Services 8 @using Co3.MCH.Website.Frontend.Models.Frontend.Vocast 9 @using Dynamicweb.Frontend.Devices 10 11 @{ 12 string centerParagraph = Espresso.Item.CenterParagraph; 13 14 if (centerParagraph == "True") 15 { 16 Espresso.Container.Classes.AddClasses("mx-auto"); 17 } 18 19 bool isDetail = Dynamicweb.Context.Current.Request["VocastKey"] != null; 20 Pressrelease pressRelease = new Pressrelease(); 21 IEnumerable<Pressrelease> pressReleases = new List<Pressrelease>(); 22 string canvasImage = string.Empty; 23 if (isDetail) 24 { 25 pressRelease = VocastService.Instance.GetPressRelease(Dynamicweb.Context.Current.Request["VocastKey"]); 26 Espresso.Text.Container.Classes.AddClasses("mch-vocast-pressrelease-detail-container js-mch-vocast-pressrelease-detail-container"); 27 if ( pressRelease != null ) 28 { 29 Variant imageVariant = null; 30 if ( pressRelease.anchorimage != null && pressRelease.anchorimage.variants.Any( v => v.width > 1000 ) ) 31 { 32 imageVariant = pressRelease.anchorimage.variants.Where( v => v.width > 1000 ).OrderBy( v => v.width ).FirstOrDefault(); 33 } 34 35 if ( imageVariant != null ) 36 { 37 canvasImage = imageVariant.imageurl; 38 } 39 } 40 } 41 else 42 { 43 pressReleases = VocastService.Instance.GetPressReleases(); 44 } 45 } 46 47 <div class="@Espresso.Container.Classes" id="@Espresso.Id"> 48 <div class="@Espresso.Wrapper.Classes"> 49 <div class="@Espresso.Text.Container.Classes" data-canvas-image="@canvasImage"> 50 @Espresso.Text.Raw 51 52 @if (isDetail) 53 { 54 if (pressRelease != null) 55 { 56 DateTime pubDateTime = DateTime.Parse(pressRelease.published); 57 <div class="row"> 58 <div class="col-12"> 59 <hr /> 60 </div> 61 </div> 62 <div class="row"> 63 <div class="col-12 col-lg-8 offset-lg-2"> 64 <a class="arrow-left" href="@PageView.Current().Page.GetPageHrefValue()">Tilbage til oversigten</a> 65 <h1 class="mt-1">@pressRelease.title</h1> 66 <p class="small text-muted">@pubDateTime.ToString("d. MMMM yyyy")</p> 67 @pressRelease.plain.Replace("<p>&nbsp;</p>", string.Empty) 68 </div> 69 </div> 70 } 71 } 72 else 73 { 74 if (pressReleases.Any()) 75 { 76 bool isDesktop = PageView.Current().Device == DeviceType.Desktop; 77 int pageSize = isDesktop ? 8 : 4; 78 Dynamicweb.Context.Current.Session[ "VocastPressreleasesPageUrl" ] = PageView.Current().SearchFriendlyUrl; 79 <div class="e-loading-overlay is-loading js-vocast-pressreleases-preloader"> 80 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 81 </div> 82 <div class="js-mch-pressreleases-items row" data-pagesize="@pageSize" data-pagenum="1"> 83 <script id="js-e-handlebars-tmpl-vocast-pressreleases" type="text/x-handlebars-template"> 84 {{#each pressReleases}} 85 {{> vocastPressreleasesItemPartial listItemHtml}} 86 {{/each}} 87 </script> 88 89 <script id="js-e-handlebars-tmpl-vocast-pressreleases-item-partial" type="text/x-handlebars-template"> 90 {{{this}}} 91 </script> 92 </div> 93 94 <div class="row js-mch-pressreleases-pagination justify-content-around"> 95 <script id="js-e-handlebars-tmpl-vocast-pressreleases-pagination" type="text/x-handlebars-template"> 96 <div class="align-items-center d-flex justify-content-end mt-2"> 97 <div class="@*d-flex flex-fill*@"> 98 {{#each pagination.pages}} 99 <a href="#" class="js-mch-vocast-pressreleases-paging-nav-item d-inline-block {{#if isCurrent}}badge-pill bg-gray-200 js-link-disabled{{/if}} text-auto text-center text-decoration-none p-0 ml-1 js-e-productlist-set-pagenum" data-page-num="{{pageNumber}}"> 100 <span>{{pageNumber}}</span> 101 </a> 102 {{/each}} 103 </div> 104 </div> 105 </script> 106 </div> 107 } 108 else 109 { 110 <div class="row"> 111 <div class="col-12"> 112 <p>@Translate("Vocast PressRelease - No pressreleases - Text", "Vi har ingen publiserede pressemeddelser...")</p> 113 </div> 114 </div> 115 } 116 } 117 </div> 118 </div> 119 </div> 120
keyboard_arrow_up