Copied to clipboard

Flag this post as spam?

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

  • Siw Ørnhaug 130 posts 109 karma points
    Mar 12, 2012 @ 09:47
    Siw Ørnhaug

    Need advice on API best practices - user control deleting nodes

    This is an "old" site, still running Umb 4.0.3, very busy. I'm maintaining it and a couple of legacy user controls that seem to cause errors every once in a while - mainly the non-descript "object reference not set to an instance of an object" and some odd Lucene indexing problems after objects are deleted.

    One user control looks for special document types and display them in a gridview. The gridview is placed in content dashboard. The admin user has the option to delete entries via the gridvew.

    My question is: What is the correct way to program document node deletion in version 4.0.3? How do I clean up so that indexing isn't corrupted?

    Another user control is a multipage form that on final submit inserts documents node in the content tree. These nodes verify form actions and are the same that are displayed in the gridview mentioned before. The form also seems to cause some errors of the null object type, but it's very difficult to trigger them. I suspect that these errors are related to deleting actions.

    Does anyone have good advice for me?

    It's a bad situation with the customer, since the site seems unstable because of this. But I can't just disable the form, it's vital to their business.

  • Siw Ørnhaug 130 posts 109 karma points
    Mar 12, 2012 @ 09:57
    Siw Ørnhaug

    Also, the form mentioned above sometimes will fail with this type of error:

    At /spb-1-nordvest/usa-vestkysten?side=bestilling (Referred by: System.TypeInitializationException: The type initializer for 'umbraco.BusinessLogic.Actions.Action' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.BusinessLogic.Utils.TypeFinder.FindClassesOfType[T](Boolean useSeperateAppDomain) at umbraco.BusinessLogic.Actions.Action.RegisterIActions() at umbraco.BusinessLogic.Actions.Action..cctor() --- End of inner exception stack trace --- at umbraco.BusinessLogic.Actions.Action.RunActionHandlers(Document d, IAction action) at umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId) at NTOrderForm.Form.maillogPost() at NTOrderForm.Form.wzrdTour_ActiveStepChanged(Object sender, EventArgs e) at System.Web.UI.WebControls.Wizard.OnActiveStepChanged(Object source, EventArgs e) at System.Web.UI.WebControls.MultiView.OnActiveViewChanged(EventArgs e) at System.Web.UI.WebControls.MultiView.set_ActiveViewIndex(Int32 value) at System.Web.UI.WebControls.Wizard.set_ActiveStepIndex(Int32 value) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Please Sign in or register to post replies

Write your reply to: