Copied to clipboard

Flag this post as spam?

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


  • Tim 168 posts 371 karma points
    Oct 25, 2011 @ 12:31
    Tim
    0

    Error publishing/deleting content from previously working install

    Running 4.7.1 on IIS7 we've suddenly started getting an "Object reference not set to an instance of an object" error when publishing (at umbraco.cms.businesslogic.web.Document.ToXml). This site has been working fine until today. The only change has been the addition of a couple of new document types "News List" and "News Item".

    The stack trace is below. We've tried deleting the umbraco.config file and that doesn't get recreated which then made us think it was a user permissions error but the permissions on the folder are right. What's really interesting is we can't delete the page either (we get the same object reference not set to an instance of an object).

    Does anyone have any ideas on what might be causing it?

    Thanks

    Tim

     

    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.]
       umbraco.cms.businesslogic.web.Document.ToXml(XmlDocument xd, Boolean Deep) +205
       umbraco.content.PublishNodeDo(Document d, XmlDocument xmlContentCopy, Boolean updateSitemapProvider) +90
       umbraco.content.UpdateDocumentCache(Document d) +484
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +121
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +540
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +186
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +164
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3706
    


  • Ismail Mayat 4511 posts 10062 karma points MVP 2x admin c-trib
    Oct 25, 2011 @ 12:33
    Ismail Mayat
    0

    Tim,

    You tried restarting the app pool?

    Regards

    Ismail

  • Tim 168 posts 371 karma points
    Oct 25, 2011 @ 12:33
    Tim
    0

    Sadly we have Ismail yep, even tried creating a new one :(

  • Tim 168 posts 371 karma points
    Oct 25, 2011 @ 12:35
    Tim
    0

    One other thing that might be worth noting is that there are no properties on the document type (I've seen the naming conventions conflict before).

    The deletion is what's really bugging me...

  • Ian Smedley 97 posts 192 karma points
    Oct 25, 2011 @ 12:49
    Ian Smedley
    0

    Is it worth adding some properties to the document type? 

    Something in the back of my mind says I have seen this before, but I can't remember where or when.

    I guess otherwise, it's get the umbraco source, and attach the debugger, see if you can step through the stack trace and find what hasn't been set..

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 25, 2011 @ 12:49
    Anthony Dang
    0

    Have you looked for ghost nodes?

     

     

    SELECT * FROM umbracoNode, cmsContent --return nodes
    WHERE
    nodeObjectType
    ='C66BA18E-EAF3-4CFF-8A22-41B16D66A972'-- that are of type 'Content'
    AND
    umbracoNode
    .id NOT IN (SELECT nodeId FROM cmsContent)-- but are notin the 'Content' table

     

  • Dirk De Grave 4539 posts 6014 karma points MVP 3x admin c-trib
    Oct 25, 2011 @ 12:51
    Dirk De Grave
    0

    All I can think off is that your xml is malformed. Deleting umbraco.config should be first step, then browse /umbraco/dialogs/republish.aspx?xml=true and see what happens?

     

    Cheers,

    /Dirk

     

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 25, 2011 @ 12:59
    Anthony Dang
    0

    Delete the new doc types or change the aliases and see if the problem remains.

     

     

     

  • Tim 168 posts 371 karma points
    Oct 25, 2011 @ 14:11
    Tim
    0

     

    @Ian: Thanks I thought you might be onto something there but sadly that's not helped. There are properties on the parent doc types so there are input editors.

    @Anthony: No ghosts sadly but good shout. We've deleted them and now none of the site publishes so I suspect it's not an issue with the data now...

    @Dirk: That just reports success irritatingly, didn't think to hit it directly that's a good shout

     

    In an attempt to resolve this we've spun up another install and oddly it will publish the site -but what's really bizarre is the perms are the same. I think something odd is going on with the permisisons somewhere.

    I'll update if we get further.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 25, 2011 @ 14:17
    Anthony Dang
    0

    Did you delete or add any templates?

    Doc types refer to templates and a missing one can cause a crash.

     

     

  • Tim 168 posts 371 karma points
    Oct 25, 2011 @ 15:02
    Tim
    0

    Thanks all, we finally got to the bottom of the issue; it turns out one of the document types had a - in it's alias which broke the XML generation, turns out, relising the error of his ways, the dev renamed the document type's alias so it was hidden.

    All good, lesson for today is don't include non-alphanumeric chars in the document type aliases!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Oct 25, 2011 @ 15:33
    Anthony Dang
    0

    So the doctype was created with a "-", then renamed?

  • Tim 168 posts 371 karma points
    Oct 25, 2011 @ 15:46
    Tim
    0

    Yes, our parent document types have -'s in the name but it was more that the alias had a - in it. Umbraco doesn't stip these when creating the XML and so, breaks.

  • umbracocool 108 posts 197 karma points
    Oct 26, 2012 @ 22:50
    umbracocool
    0

    Thank you!. In reply I have solved the problem!

    I solved the problem already!. It turns out that this error was the alias of DocumentTypes. Ex: "Contact Us", the alias would be "ContactUs" worst I had as "Contact-Us", and that fucking script was the problem. What if someday encounter this you know!. Greetings friends!

     

Please Sign in or register to post replies

Write your reply to:

Draft