Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ravi Motha 239 posts 379 karma points mvp
    Nov 25, 2016 @ 16:52
    Ravi Motha
    0

    Issue with Leblender editor and displaying content

    I ahve installed Leblender and happily created a second widget for use in a grid, the widget is a 4 text boxes that will display data

    I have specified a render file but for some reason i get an error on the out out

    System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for system.web.webPages.razor/host: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\work\gpe\website\app_plugins\leblender\web.config line 5) ---> System.IO.FileLoadException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
       at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
       at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
       at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
       at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
       at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
       --- End of inner exception stack trace ---
       at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
       at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
       at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
       at System.Web.Configuration.WebConfigurationManager.GetSection(String sectionName, String path)
       at System.Web.WebPages.Razor.WebRazorHostFactory.GetRazorSection(String virtualPath)
       at System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(String virtualPath, String physicalPath)
       at System.Web.WebPages.Razor.RazorBuildProvider.GetHostFromConfig()
       at System.Web.WebPages.Razor.RazorBuildProvider.CreateHost()
       at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode()
       at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType()
       at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
       at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
       at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
       at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
       at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
       at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
       at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
       at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath)
       at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionaryviewData)
       at ASP._Page_Views_Partials_grid_editors_base_cshtml.Execute() in c:\work\gpe\website\Views\Partials\Grid\Editors\Base.cshtml:line 20
    

    Here;s the back office: enter image description here

    and here's the code to display

    @inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
    
    
    @foreach (var item in Model.Items)
    {
    
    <div class="stats-box stats-box--single">
    
        <p class="stat-figure">@item.GetValue("statisticOne")</p>
        <p class="stat-type">@item.GetValue("statisticOneType")</p>
    
        <p class="stat-figure">@item.GetValue("statisticTwo")</p>
        <p class="stat-type">@item.GetValue("statisticTwoType")</p>
    </div>
    }
    

    I've tried the viewstart thing, but what intrigues me is that I have another widget pointing to the right thing okay??

    any ideas would be appreciated Ravi

  • Garðar Þorsteinsson 47 posts 302 karma points
    Nov 25, 2016 @ 17:21
    Gar├░ar ├×orsteinsson
    0

    Hi Ravi,

    Try to merge the web.config in leblender folder with your own web.config inside the view folder.

  • Ravi Motha 239 posts 379 karma points mvp
    Nov 25, 2016 @ 17:35
    Ravi Motha
    0

    Not sure what you mean merge which way

    the only thing that appears different in the 2 configs are : views web config

            <add namespace="Umbraco.Web.PublishedContentModels"/>
    

    leblender web config

      <controls>
        <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
      </controls>
    
  • Ravi Motha 239 posts 379 karma points mvp
    Nov 25, 2016 @ 17:55
    Ravi Motha
    0

    okay I've made the web configs match each other using the latest versions in each one, and no change

  • Ravi Motha 239 posts 379 karma points mvp
    Nov 25, 2016 @ 18:12
    Ravi Motha
    0

    If I add any new standard grid elements like a textstring, and point to a new renderer its fine otherwise it s breaks I'm going to leave it over the weekend and try a different Type of leblender editor and see if that also breaks

Please Sign in or register to post replies

Write your reply to:

Draft