Copied to clipboard

Flag this post as spam?

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


  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 12, 2015 @ 12:16
    Stefan Kip
    0

    Page unpublished - NullReference

    When the page with the Grid editor isn't published, a NulLReference Exception is thrown while trying to render the LeBlenderEditor:

    Object reference not set to an instance of an object.

    This exception occurs when trying to call GetValue on the item with an existing property alias:

    Model.Items.Single().GetValue("text");

    Stacktrace:

       at Lecoati.LeBlender.Extension.Models.LeBlenderPropertyModel.GetValue[T]()
       at Lecoati.LeBlender.Extension.Models.LeBlenderValue.GetValue[T](String propertyAlias)
       at ASP._Page_views_partials_grid_editors_Iframe_cshtml.Execute() in d:\some-path\Views\Partials\Grid\Editors\Iframe.cshtml:line 3
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
       at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
       at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1a.
  • Antoine 176 posts 1494 karma points
    May 12, 2015 @ 16:18
    Antoine
    100

    Hi kipusoep ! 

    I fixed that and pushed it within github, I will include the parch within the next LeBlender release.

    thanks for your feedback

     

  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 12, 2015 @ 16:50
    Stefan Kip
    0

    Nice work! Had another issue too. I added a true/false picker and an archetype with only a textstring property. This only works if I set Min and Max to 1. If I leave those empty, the editor doesn't work. It just says "Edit your content here" and underneath it's empty.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 12, 2015 @ 16:52
    Stefan Kip
    0

    It seems to be unrelated to archetype. If I use a LeBlender editor and leave Min and Max empty, it just doesn't work.
    What's it used for anyway?

  • Antoine 176 posts 1494 karma points
    May 12, 2015 @ 17:01
    Antoine
    0

    I have fixed that as well, min / max have to be >=1, so if they are empty they are now autoset to 1

  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 12, 2015 @ 17:18
    Stefan Kip
    0

    How about unlimited items? I'd say the Max field should be empty?

  • Antoine 176 posts 1494 karma points
    May 12, 2015 @ 17:25
    Antoine
    0

    By default min = max = 1, unlimited items is not contemplated here, you just have to set a big number :)

  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 12, 2015 @ 18:28
    Stefan Kip
    0

    Okay, I think I'll use Archetype as property for multiple items anyway, for example a slider would look like this in LeBlender editor:

    1. Transition delay (numeric)
    2. Autostart (true/false)
    3. Slider items (Archetype - picture, title, link etc.)

    Agree? Or am I missing something? I really like LeBlender btw! Preferring it before Doc Type Grid editor at the moment, because of:

    • Icons in the Grid editor
    • Seperation of concerns (Doctypes are used for something else than the Grid in the first place)
    • Versionable configuration (JSON file, yay)

    Thanks for this great package!

  • Antoine 176 posts 1494 karma points
    May 12, 2015 @ 18:42
    Antoine
    0

    Your approach is perfect. There is a feature request about adding nested list of properties within LeBlender Editor but it can be done perfectly with Archetype and the result it awesome...

    Thanks for your nice feedback :)

       

  • Stefan Kip 1614 posts 4131 karma points c-trib
    May 12, 2015 @ 18:47
    Stefan Kip
    0

    I would close that feature request if I were you, as it's perfectly do-able with another awesome and stable plug-in (Archetype in this case). :-)

  • Antoine 176 posts 1494 karma points
    May 12, 2015 @ 20:32
    Antoine
    0

    defo !

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies