An error occurred while attaching module (Dynamicweb.Frontend.Content)

System.ArgumentException: The given field name does not exist in the given index schema. Field: 'VariantGroup_VARGRP1', Index: 'Products.index'.
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpressionInternal(IIndex index, Expression expression, Analyzer analyzer, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.Helpers.ParseQueryExpression(IIndex index, Expression expression, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.SearchInternal(IQuery query, QuerySettings settings)
   at Dynamicweb.Indexing.Lucene.LuceneIndexProvider.Query(IQuery query, QuerySettings settings)
   at Dynamicweb.Indexing.Queries.IndexQueryProvider.Query(IQuery query, QuerySettings settings)
   at Dynamicweb.Indexing.Querying.QueryService.Query(IQuery query, QuerySettings settings)
   at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.ExecuteQuery(IQuery query, QuerySettings settings, PageView pageview)
   at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetProductsAutoIdsFromIndexQuery(IQuery query, QuerySettings querySettings, PageView pageview, Boolean showFacetOptionsWithNoResults, IEnumerable`1& facetViewModel, IEnumerable`1& spellCheckerResult, Int32& totalProductCount)
   at Dynamicweb.Ecommerce.Indexing.ProductQueryHelper.GetProductsAutoIds(ProductCatalogSettings settings, String groupId, ContentModule contentModule, PageView pageview, IEnumerable`1& facetViewModel, IEnumerable`1& spellCheckerResult)
   at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.RenderProductList(ProductCatalogSettings settings, String groupId, Boolean feed)
   at Dynamicweb.Ecommerce.ProductCatalog.ProductCatalogFrontend.GetContent()
   at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)

Error executing template "Designs/Swift/Paragraph/Swift_ProductListGroupPoster.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_6931ef9190d84c1fbcb5999eccac9184.Execute() in Z:\Sites\_dotFusion\commergent.eu\Swift\Files\Templates\Designs\Swift\Paragraph\Swift_ProductListGroupPoster.cshtml:line 41
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Frontend.Navigation 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Environment 5 @using Dynamicweb.Frontend 6 7 @{ 8 ProductListViewModel productList = new ProductListViewModel(); 9 10 ProductListViewModelSettings productSetting = new ProductListViewModelSettings 11 { 12 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID, 13 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 14 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2, 15 ShopId = Pageview.Area.EcomShopId 16 }; 17 18 if (Dynamicweb.Context.Current.Items.Contains("ProductList")) 19 { 20 productList = (ProductListViewModel)Dynamicweb.Context.Current.Items["ProductList"]; 21 } 22 else if (Pageview.Item["DummyProductGroup"] != null) 23 { 24 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 25 ProductListViewModel groupList = pageViewModel.Item.GetValue("DummyProductGroup") != null ? pageViewModel.Item.GetValue("DummyProductGroup") as ProductListViewModel : new ProductListViewModel(); 26 27 if (groupList?.Group?.Id != null) 28 { 29 productList = ViewModelFactory.CreateView(productSetting, groupList.Group.Id); 30 Dynamicweb.Context.Current.Items.Add("ProductList", productList); 31 } 32 else 33 { 34 productList = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.ProductGroups.GetGroups(Dynamicweb.Ecommerce.Common.Context.LanguageID).FirstOrDefault().Id); 35 36 Dynamicweb.Context.Current.Items.Add("ProductList", productList); 37 } 38 } 39 else if (Pageview.Item["DummyProductGroup"] == null) 40 { 41 productList = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.ProductGroups.GetGroups(Dynamicweb.Ecommerce.Common.Context.LanguageID).FirstOrDefault().Id); 42 Dynamicweb.Context.Current.Items.Add("ProductList", productList); 43 } 44 45 string layout = Model.Item.GetRawValueString("Layout", "align-middle-center-text-center"); 46 string alignment = ""; 47 48 string searchParameter = Dynamicweb.Context.Current.Request.GetString("q"); 49 50 bool hideTitle = Model.Item.GetBoolean("HideGroupTitle"); 51 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "display-4"); 52 53 var navigationSettings = new NavigationSettings(); 54 navigationSettings.StartLevel = 2; 55 navigationSettings.ExpandMode = ExpandMode.Path; 56 navigationSettings.Parameters.Add("HideBreadcrumb", true); 57 navigationSettings.Parameters.Add("TitleFontSize", titleFontSize); 58 59 string breadcrumbContent = Navigation.RenderNavigation("Navigation/ProductGroupHeader.cshtml", navigationSettings); 60 breadcrumbContent = searchParameter != "" ? "<h1 class=\"" + titleFontSize + "\">" + Translate("Search results for") + ": " + searchParameter + "</h1>" : breadcrumbContent; 61 62 bool hideDescription = Model.Item.GetBoolean("HideGroupDescription"); 63 string groupDescription = productList?.Group?.Description != null ? productList.Group.Description : ""; 64 string descriptionFontSize = Model.Item.GetRawValueString("DescriptionFontSize", "fs-6"); 65 66 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : ""; 67 68 string posterHeight = Model.Item.GetRawValueString("PosterHeight", ""); 69 posterHeight = posterHeight == "small" ? "min-vh-25" : posterHeight; 70 posterHeight = posterHeight == "medium" ? "min-vh-25 min-vh-md-50" : posterHeight; 71 posterHeight = posterHeight == "large" ? "min-vh-50 min-vh-md-75" : posterHeight; 72 73 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 74 contentPadding = contentPadding == "none" ? "p-3 px-xl-3 py-xl-4" : contentPadding; 75 contentPadding = contentPadding == "small" ? "p-3 p-xl-4" : contentPadding; 76 contentPadding = contentPadding == "large" ? "p-4 p-xl-5" : contentPadding; 77 78 string maxWidth = Model.Item.GetRawValueString("TextReadability", "max-width-on"); 79 maxWidth = maxWidth == "max-width-on" ? " mw-75ch" : maxWidth; 80 maxWidth = maxWidth == "max-width-off" ? "" : maxWidth; 81 82 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 83 } 84 85 @if (!string.IsNullOrEmpty(groupImage)) { 86 var parms = new Dictionary<string, object>(); 87 parms.Add("cssClass", "h-100 w-100"); 88 parms.Add("columns", Model.GridRowColumnCount); 89 90 switch (layout) 91 { 92 case "align-top-left-text-left": 93 alignment = "text-start justify-content-start align-items-start"; 94 break; 95 case "align-top-center-text-center": 96 alignment = "text-center justify-content-center align-items-start"; 97 break; 98 case "align-top-right-text-right": 99 alignment = "text-end justify-content-end align-items-start"; 100 break; 101 case "align-middle-left-text-left": 102 alignment = "text-start justify-content-start align-items-center"; 103 break; 104 case "align-middle-center-text-center": 105 alignment = "text-center justify-content-center align-items-center"; 106 break; 107 case "align-middle-right-text-right": 108 alignment = "text-end justify-content-end align-items-center"; 109 break; 110 case "align-bottom-left-text-left": 111 alignment = "text-start justify-content-start align-items-end"; 112 break; 113 case "align-bottom-center-text-center": 114 alignment = "text-center justify-content-center align-items-end"; 115 break; 116 case "align-bottom-right-text-right": 117 alignment = "text-end justify-content-end align-items-end"; 118 break; 119 } 120 121 <div class="position-relative h-100@(theme) @(posterHeight) item_@Model.Item.SystemName.ToLower()"> 122 @if (!string.IsNullOrEmpty(groupImage)) { 123 string imageFilter = Model.Item.GetRawValueString("ImageFilter", ""); 124 imageFilter = imageFilter == "no-filter" ? "" : imageFilter; 125 imageFilter = imageFilter == "filter" ? " image-filter" : imageFilter; 126 127 <div class="position-absolute top-0 bottom-0 end-0 start-0@(imageFilter)"> 128 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 129 </div> 130 } 131 132 <div class="container-xl h-100 @(contentPadding)"> 133 <div class="h-100 w-100 position-relative d-flex @(alignment)"> 134 <div class="@(maxWidth)"> 135 @if (!hideTitle) { 136 @breadcrumbContent 137 } 138 139 @if (!hideDescription && !string.IsNullOrEmpty(groupDescription)) { 140 <div class="@descriptionFontSize"> 141 @groupDescription 142 </div> 143 } 144 </div> 145 </div> 146 </div> 147 </div> 148 } else if (Pageview.IsVisualEditorMode) { 149 <div class="alert alert-dark m-0" role="alert"> 150 <span>@Translate("Product group poster: The poster paragraph will be hiden here, if any")</span> 151 </div> 152 } 153

Sort by

We did not find anything matching your search result
By clicking 'Accept All' you consent that we may collect information about you for various purposes, including: Functionality, Statistics and Marketing