Copied to clipboard

Flag this post as spam?

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


  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 26, 2015 @ 16:23
    Dave Woestenborghs
    0

    Nuget package breaks developer tree

    When I install the package it breaks my developer tree.

    I see this error when umbraco/backoffice/UmbracoTrees/ApplicationTree/GetApplicationTrees?application=developer&tree=&isDialog=false is requested

    {
    "Message": "An error has occurred.",
    "ExceptionMessage": "Object reference not set to an instance of an object.",
    "ExceptionType": "System.NullReferenceException",
    "StackTrace": "   at Umbraco.Web.Trees.ApplicationTreeExtensions.<TryGetRootNodeFromControllerTree>d__4.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Umbraco.Web.Trees.ApplicationTreeController.<GetRootForMultipleAppTree>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at Umbraco.Web.Trees.ApplicationTreeController.<GetApplicationTrees>d__4.MoveNext()"
    }

    The tree is registered in the tree.config

    <add initialize="true" sortOrder="0" alias="GridEditorManager" application="developer" title="Grid Editors" iconClosed="icon-doc" iconOpen="icon-folder-open" type="Lecoati.leblender.Extension.Controllers.LeBlenderEditorManagerTreeController, Lecoati.leblender.Extension" />

    Any idea what is causing this. A odd thing is that dll in the bin folder has different casing as the one in the config file (Lecoati.LeBlender.Extension) ?

    Dave

     

  • Mads Krohn 211 posts 504 karma points c-trib
    May 26, 2015 @ 17:29
    Mads Krohn
    0

    Hi there

    Just tried to install this package as well and I get the same error.
    Hopefully this can be resolved quickly, I really want to try out LeBlender :)

    Cheers
    Mads

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    May 26, 2015 @ 18:03
    Jesper Ordrup
    0

    Sounds like it's a version thing. We just installed LeBlender in an Umbraco 7.25 test installation last week. Works fine.

    best Jesper

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 26, 2015 @ 18:04
    Dave Woestenborghs
    0

    I'm running 7.2.4, but have this with several LeBlender versions from nuget

    Dave

  • Mads Krohn 211 posts 504 karma points c-trib
    May 26, 2015 @ 18:10
    Mads Krohn
    0

    Running Umbraco 7.2.4 as well .. Seeing the error on both 1.0.2 and 1.0.6, NuGet can't seem to find any versions between those two ..

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

    Had no issues with 7.2.5.

  • Antoine 176 posts 1494 karma points
    May 26, 2015 @ 18:51
    Antoine
    0

    I tried Umbraco 7.2.4 / 7.2.5 (clear install) with LeBlender 1.0.2 / 1.0.6 (nuget) but I can't reproduce this issue.

    Dave, your LeBlender registery within tree.config seems to be right. Could you give me some more information about environment and if you have some others packages installed.

  • Mads Krohn 211 posts 504 karma points c-trib
    May 26, 2015 @ 19:19
    Mads Krohn
    0

    Just tried on a clean install as well, can't reproduce the error.
    Will try to do some more debugging on the existing project where I get the error.

    /Mads

  • Antoine 176 posts 1494 karma points
    May 26, 2015 @ 19:25
    Antoine
    0

    Thanks Mads !

    Could you please try with this version http://lecoati.com/tmp/LeBlender_1.0.6_next.zip, I have fixed the differents cases between Dll and namesapces just in case...

    I have tried as well with the starter kid installed... but no way to reproduce that :/

  • Mads Krohn 211 posts 504 karma points c-trib
    May 26, 2015 @ 19:32
    Mads Krohn
    0

    Just tried, makes no difference.
    However, just realized, it has something to do with the Autofac DI/IoC setup I use.

    Dave, are you using some kind of DI setup as well ??

  • Mads Krohn 211 posts 504 karma points c-trib
    May 26, 2015 @ 19:36
    Mads Krohn
    104

    Yeah, adding something like
    builder.RegisterApiControllers(typeof (Lecoati.LeBlender.Extension.Controllers.LeBlenderController).Assembly);
    makes the developer tree work again.

    Thanks for the quick feedback :)

  • Antoine 176 posts 1494 karma points
    May 26, 2015 @ 19:39
    Antoine
    0

    Ok, great! Happy to hear that.

    Good job !!

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 27, 2015 @ 09:45
    Dave Woestenborghs
    0

    I'm using DI as well. I will try this and see if it works.

  • Mads Krohn 211 posts 504 karma points c-trib
    May 27, 2015 @ 09:49
    Mads Krohn
    0

    Just as I thought, then that is definitely the issue :)

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 27, 2015 @ 09:54
    Dave Woestenborghs
    0

    Hi Mads,

    The problem was indeed DI. Adding your line of code made the tree work again.

    Dave

  • Mads Krohn 211 posts 504 karma points c-trib
    May 27, 2015 @ 15:26
    Mads Krohn
    0

    Hi Dave

    Great to hear :)

    /Mads

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Oct 27, 2015 @ 14:07
    Ismail Mayat
    0

    Mads,

    Any idea how to do this with ninject?

    Regards

    Ismail

  • Mads Krohn 211 posts 504 karma points c-trib
    Oct 27, 2015 @ 14:16
    Mads Krohn
    0

    Not really, but the principles should be the same, the syntax is probably just a bit different.

    Does this SO answer help ?
    http://stackoverflow.com/questions/16382982/configuring-ninject-with-asp-net-mvc-web-api

    /Mads

Please Sign in or register to post replies

Write your reply to:

Draft