Copied to clipboard

Flag this post as spam?

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


  • Niels Kristiansen 166 posts 382 karma points
    Jun 23, 2012 @ 14:36
    Niels Kristiansen
    0

    Getting a Object reference not set to an instance of an object.

    I saw this package at CG12, and it just looked awesome, but unfortuantly I can't get it to work on 4.7.1.1.

    When trying to install Document Type Fieldsets I get the following error:

    Object reference not set to an instance of an object.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
    
    Source Error:
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace:
    
    
    [NullReferenceException: Object reference not set to an instance of an object.]
       Our.Umbraco.DocTypeFieldsets.Extensions.DataHelper.GetFieldsetForProperty(String alias, Int32 contentTypeId) +128
       Our.Umbraco.DocTypeFieldsets.Events.InjectEditorControls.AddFieldsetTextboxForAll(Control rootProperties) +463
       Our.Umbraco.DocTypeFieldsets.Events.InjectEditorControls.rootProperties_Load(Object sender, EventArgs e) +223
       System.Web.UI.Page.OnLoadComplete(EventArgs e) +8872202
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2350
    
  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 23, 2012 @ 15:58
    Tom Fulton
    0

    Hi Niels,

    Thanks for reporting this.  I've tested in 4.7.1.1 and it should work fine, however as I mentioned I'm still working out a few bugs :)

    Can you make sure that your web.config file has the following line added?

      <DocTypeFieldsets configSource="config\DocTypeFieldsets.config" />

    If so, can you also post the contents of the config\DocTypeFieldsets.config file?

    Thanks,
    Tom 

  • Niels Kristiansen 166 posts 382 karma points
    Jun 23, 2012 @ 16:29
    Niels Kristiansen
    2

    Hi Tom,

    See, that's was the problem. I guess there was no rights for the web.config, which resulted in the problem. I have now placed the following in web.config:

    <configuration> -> <configurationSections>:

    <section name="DocTypeFieldsets" type="Our.Umbraco.DocTypeFieldsets.Configuration.ConfigSection, Our.Umbraco.DocTypeFieldsets, Version=0.5.1.0, Culture=neutral, PublicKeyToken=null" restartOnExternalChanges="false" />

    And right before this code is executed in web.config:
    <urlrewritingnet configSource="config\UrlRewriting.config" />

    I placed the following code:

    <DocTypeFieldsets configSource="config\DocTypeFieldsets.config" />

    Now it all looks like it working...

  • Niels Kristiansen 166 posts 382 karma points
    Jun 23, 2012 @ 16:30
    Niels Kristiansen
    0

    By the way, thanks for the superfast answer and help :)

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 23, 2012 @ 16:32
    Tom Fulton
    0

    Awesome, glad it's working!  

    So was the issue that you didn't have Write enabled for web.config?  Or was it something else?  If so maybe you can check the umbracoLog table around the time you installed the package to see if there's any errors.

    Maybe I can add some Manual Installation notes in case this happens in the future

    Thanks for reporting :)

    -Tom

  • Niels Kristiansen 166 posts 382 karma points
    Jun 23, 2012 @ 16:46
    Niels Kristiansen
    0

    Hi Tom,

    It was because I didn't have write enabled for web.config (this can also happen when installing in hosting environment).

    So for those who have the same problem a manual installation note would be awesome. Though, the only problem would be the web.config writing as I see it.

    But wauv, nice little piece of extra client happiness with this plugin :) 

    /Niels

Please Sign in or register to post replies

Write your reply to:

Draft