Copied to clipboard

Flag this post as spam?

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


  • Andrew 32 posts 52 karma points
    Nov 08, 2010 @ 17:38
    Andrew
    0

    Make mistake in SQL Database

    I was receiving the error:

    "Please make sure that you do not have 2 templates with the same alias" when I was trying to save a template.  I looked in the SQL database under dbo.cmsTemplate and found that there was an item which had a duplicate name.  I deleted that row from the database thinking that I would solve the problem, but I have made things worse.  Now, when I try to access the templates through Umbraco I don't see any nodes beneath templates.  If I try to create a new one, 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.]
    umbraco.cms.businesslogic.template.Template.get_MasterPageFile() +113
    umbraco.cms.businesslogic.template.Template.getMasterPageContent() +83
    umbraco.cms.businesslogic.template.Template.setupNode() +885
    umbraco.cms.businesslogic.CMSNode..ctor(Guid uniqueID) +428
    umbraco.cms.businesslogic.template.Template..ctor(Guid id) +83
    umbraco.cms.businesslogic.template.Template.GetAllAsList() +502
    umbraco.cms.presentation.settings.editTemplate.Page_Load(Object sender, EventArgs e) +390
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
    umbraco.BasePages.BasePage.OnLoad(EventArgs e) +73
    System.Web.UI.Control.LoadRecursive() +115
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2749

     

    If anyone knows how I can fix this, I would really appreciate it.  Thanks for your help!

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Nov 08, 2010 @ 18:26
    Lee Kelleher
    0

    Hi Andrew,

    There are a couple of other tables that you'll need to remove the template from reference: "cmsTemplate" and "umbracoNode".

    Check the "umbracoNode" table first, make a note of the NodeId ... and then delete the related row from "cmsTemplate".

    I wouldn't usually recommend that you try to manipulate data directly in the database, but I think you're already in a tight-spot!?

    Cheers, Lee.

Please Sign in or register to post replies

Write your reply to:

Draft