Copied to clipboard

Flag this post as spam?

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


  • Tizer 170 posts 201 karma points
    Jun 09, 2010 @ 09:20
    Tizer
    0

    Document Type / Template error

    So I have just moved a site to my server, it has taken a while, but I still have "No Pages Error" :(

    In settings, I have Document Types, but no Templates.

    If I try to edit a Document Type, I get the following error - but don't know where to look to change it - I can't even find it in the site files or database.

    Any ideas?

    [NullReferenceException: Object reference not set to an instance of an object.]
    umbraco.cms.businesslogic.template.Template.get_MasterPageFile() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:36
    umbraco.cms.businesslogic.template.Template.getMasterPageContent() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:148
    umbraco.cms.businesslogic.template.Template.setupTemplate() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:136
    umbraco.cms.businesslogic.template.Template..ctor(Guid id) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:61
    umbraco.cms.businesslogic.template.Template.GetAllAsList() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:326
    umbraco.settings.EditContentTypeNew.bindTemplates() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\settings\EditNodeTypeNew.aspx.cs:40
    umbraco.settings.EditContentTypeNew.Page_Load(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\settings\EditNodeTypeNew.aspx.cs:26
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    umbraco.BasePages.BasePage.OnLoad(EventArgs e) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\businesslogic\BasePages\BasePage.cs:287
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

  • Chris Dunn 210 posts 401 karma points
    Jun 09, 2010 @ 21:45
    Chris Dunn
    0

    Did you copy all of your masterpage files to the production server?  Found under /masterpages.

    I assume you did this in a package?

    -Chris

  • Tizer 170 posts 201 karma points
    Jun 10, 2010 @ 03:39
    Tizer
    0

    How to you mean in a package?

    All my masterpages are uploaded and I can view document types, but no templates. This is the error I get when I try to edit a masterpage (with the stack trace above):

    Server Error in '/' Application.

    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.
  • David Ferguson 15 posts 35 karma points
    Jun 10, 2010 @ 20:16
    David Ferguson
    0

    Did you move the Umbraco database and amend the connection string in the web.config file accordingly?

  • Kims 25 posts 34 karma points
    Jun 24, 2011 @ 06:09
    Kims
    0

    Hi,

    I have a similar issue to Tizer, I've upgraded to 4.5.2 from 4.0.4.2. (running asp.net4 , iis6)

    Everything is fine, all pages are there but if I click templates nothing happens, all my templates are missing from 4.0.4.2.

    Issue with Doc Types too, I can see them but when I try to preview it, it spits out this error:

    Server Error in '/' Application.


    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() +74
    umbraco.cms.businesslogic.template.Template.getMasterPageContent() +63
    umbraco.cms.businesslogic.template.Template.setupNode() +425
    umbraco.cms.businesslogic.CMSNode..ctor(Guid uniqueID) +269
    umbraco.cms.businesslogic.template.Template..ctor(Guid id) +50
    umbraco.cms.businesslogic.template.Template.GetAllAsList() +211
    umbraco.settings.EditContentTypeNew.bindTemplates() +413
    umbraco.settings.EditContentTypeNew.Page_Load(Object sender, EventArgs e) +194
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +91
    umbraco.BasePages.BasePage.OnLoad(EventArgs e) +49
    System.Web.UI.Control.LoadRecursive() +74
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    I can still see my templates under the /masterpages folder but they don't appear under Templates in Umbraco.

    There are no duplicate entries in the DB so I have no idea why this is happening.

    If I turn this off: in umbracoSettings.config

      <templates>
        <useAspNetMasterPages>true</useAspNetMasterPages>
      </templates>

    I can see all my templates in Umbraco, Doc Types appear and work but if I click on a template it throws a different type of server error :( Anyway I've turned it back on.

    Does anyone have any ideas?

    Kim

  • snake001 4 posts 25 karma points
    Nov 03, 2011 @ 15:06
    snake001
    1

    Hi there,

    we just got across the same (I think) issue. What turned out to be the reason for us was some discrepancy between umbracoNode and cmsTemplate tables, i.e. there were nodes with template type in umbracoNode and that were missing in cmsTemplate. It caused exactly the behaviour of throwing null reference exception while calling 

    http://localhost:XXXX/umbraco/webservices/TreeDataService.ashx?rnd=6d8884c0b5db40be9400fbd6c3dfae7a&id=-1&treeType=templates&contextMenu=true&isDialog=false&rnd2=42.3 

    and not displaying any nodes under Templates in settings tab.

    Easiest way to find out if this is the case, run the following query:

    SELECT [pk],[nodeId],[master],[alias],[design],id, trashed, parentID, nodeUser, level, path, sortOrder, uniqueID, text, nodeObjectType, createDate
      FROM [cmsTemplate] t
    right join umbracoNode un on t.nodeId = un.id
    WHERE un.nodeObjectType='6FBDE604-4178-42CE-A10B-8A2600A2F07D' 

    and look for nulls in "left" side.

    Hope this helps someone.

     

  • Kevon K. Hayes 255 posts 281 karma points
    Nov 15, 2011 @ 02:21
    Kevon K. Hayes
    0

    What does it mean if all your record in the cmsTemplate Table contains null values for the "master" column?

Please Sign in or register to post replies

Write your reply to:

Draft