More in this section

Forums / Bugs & Issues / Page Template Admin won't load

Page Template Admin won't load

9 posts, 0 answered
  1. Jeremy
    Jeremy avatar
    17 posts
    Registered:
    28 Jul 2010
    06 Feb 2011
    Link to this post
    I've recently installed Sitefinity 4.0 and am working on my first instance. I spent some time playing around with a page and various layouts. I then set that page to use an included template. I then wanted to upload my own master page to generate a new template.

    I went to Design / Page Templates but when the page loads, the browser pops up a dialog that says "Object reference not set to an instance of an object."

    I'm assuming its a javascript error, but I can't get any debuggers loaded before the browser hits the error. Once I get the error, and click Ok, it just keeps regenerating the error.

    Any ideas on how I can troubleshoot this?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Feb 2011
    Link to this post
    Hello Jeremy,

    Can you please enable SVC tracing on your website by adding the bellow configuration to your web.config:
    <system.diagnostics>
      <trace autoflush="true" />
      <sources>
        <source name="System.ServiceModel"
                switchValue="Information, ActivityTracing"
                propagateActivity="true">
          <listeners>
            <add name="sdt"
                type="System.Diagnostics.XmlWriterTraceListener"
                initializeData= "SdrConfigExample.e2e" />
          </listeners>
        </source>
      </sources>
    </system.diagnostics>

    This will create a file SdrConfigExample.e2e in the root of your project. Please try navigating to pages and see the service fail. Then send us the trace log, we will examine it and determine why the service is failing.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Andrei
    Andrei avatar
    8 posts
    Registered:
    20 Aug 2010
    04 Apr 2011
    Link to this post
    I have exactly same problem. Please see information from the log file below.

    <Computer>WDEV0010</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.TraceHandledException.aspx</TraceIdentifier><Description>Handling an exception.</Description><AppDomain>/LM/W3SVC/1/ROOT/Intranet-1-129464156053697011</AppDomain><Exception><ExceptionType>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object reference not set to an instance of an object.</Message><StackTrace>   at Telerik.Sitefinity.Modules.Pages.Web.Services.Model.PageTemplateViewModel.GetPagesBasedOnTempalate(PageTemplate template)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.Model.PageTemplateViewModel..ctor(PageTemplate pageTemplate)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;GetPageTemplatesInternal&amp;gt;b__1(PageTemplate t)
       at System.Collections.Generic.List`1.ForEach(Action`1 action)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.GetPageTemplatesInternal(String root)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.GetPageTemlates(String root)
       at SyncInvokeGetPageTemlates(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp; outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><ExceptionString>System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.Sitefinity.Modules.Pages.Web.Services.Model.PageTemplateViewModel.GetPagesBasedOnTempalate(PageTemplate template)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.Model.PageTemplateViewModel..ctor(PageTemplate pageTemplate)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;GetPageTemplatesInternal&amp;gt;b__1(PageTemplate t)
       at System.Collections.Generic.List`1.ForEach(Action`1 action)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.GetPageTemplatesInternal(String root)
       at Telerik.Sitefinity.Modules.Pages.Web.Services.PageTemplatesService.GetPageTemlates(String root)
       at SyncInvokeGetPageTemlates(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp; outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;amp; rpc)
       at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</ExceptionString></Exception></TraceRecord></DataItem></TraceData></ApplicationData></E2ETraceEvent><E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="2621643http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>262164</EventID><Type>3</Type><SubType Name="Information">0</SubType><Level>8</Level><TimeCreated SystemTime="2011-04-04T18:34:38.6407011Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{ef6d9d7e-94c1-430d-97a7-8f602c4a98c0}" /><Execution ProcessName="w3wp" ProcessID="3500" ThreadID="7" /><Channel/><Computer>WDEV0010</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Information"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Channels.MessageSent.aspx</TraceIdentifier><Description>Sent a message over a channel.</Description><AppDomain>/LM/W3SVC/1/ROOT/Intranet-1-129464156053697011</AppDomain><Source>System.ServiceModel.Activation.HostedHttpContext+HostedRequestHttpOutput/21106823</Source><ExtendedData xmlns="application/json'>http://schemas.microsoft.com/2006/08/ServiceModel/MessageTraceRecord"><MessageProperties><Encoder>application/json; charset=utf-8</Encoder><AllowOutputBatching>False</AllowOutputBatching></MessageProperties><MessageHeaders></MessageHeaders></ExtendedData></TraceRecord></DataItem></TraceData></ApplicationData></E2ETraceEvent><E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="1310853http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>131085</EventID><Type>3</Type><SubType Name="Stop">0</SubType><Level>255</Level><TimeCreated SystemTime="2011-04-04T18:34:38.6407011Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{ef6d9d7e-94c1-430d-97a7-8f602c4a98c0}" /><Execution ProcessName="w3wp" ProcessID="3500" ThreadID="7" /><Channel/><Computer>WDEV0010</Computer></System><ApplicationData><TraceData><DataItem><TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Stop"><TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ActivityBoundary.aspx</TraceIdentifier><Description>Activity boundary.</Description><AppDomain>/LM/W3SVC/1/ROOT/Intranet-1-129464156053697011</AppDomain><ExtendedData xmlns="Process'>http://schemas.microsoft.com/2006/08/ServiceModel/DictionaryTraceRecord"><ActivityName>Process action ''.</ActivityName><ActivityType>ProcessAction</ActivityType></ExtendedData></TraceRecord></DataItem></TraceData></ApplicationData></E2ETraceEvent><E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"><System xmlns="03http://schemas.microsoft.com/2004/06/windows/eventlog/system"><EventID>0</EventID><Type>3</Type><SubType Name="Transfer">0</SubType><Level>255</Level><TimeCreated SystemTime="2011-04-04T18:34:39.4347011Z" /><Source Name="System.ServiceModel" /><Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" RelatedActivityID="{819f4037-0928-4142-a75e-3aeb8fab1966}" /><Execution ProcessName="w3wp" ProcessID="3500" ThreadID="7" /><Channel/>
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Apr 2011
    Link to this post
    Hi Andrei,

    There could be some issue with the drafts

    Can you check whether the following query will return results

    SELECT
    FROM [dbo].[sf_draft_pages] where page_id IS NULL

    If there are any rows in the result perform DELETE

    Regards,
    Ivan Dimitrov
    the Telerik team

  5. Andrei
    Andrei avatar
    8 posts
    Registered:
    20 Aug 2010
    04 Apr 2011
    Link to this post
    executing
    DELETE FROM [dbo].[sf_draft_pages] where page_id IS NULL
    solved the problem.

    Thanks a lot
  6. Jesus
    Jesus avatar
    1 posts
    Registered:
    26 Apr 2011
    26 Apr 2011
    Link to this post
    Any news on this error?

    My development team is using SiteFinity 4.1, we had 2 custom templates (with their own masterpage), everything went smoothly until today, we started to receive the message "Object reference not set to an instance of an object." when trying to access the Design/Page Templates Administator page. At this time, we:

    - Checked that both masterpage has their asp.net forms
    - Executed 'DELETE FROM [dbo].[sf_draft_pages] where page_id IS NULL'  on database
    - Restarted IIS

    But nothing works.

    We have customer review on schedule for tomorrow... help!
  7. Armen
    Armen avatar
    11 posts
    Registered:
    07 Feb 2008
    27 Apr 2011
    Link to this post
    We have exactly the same problem, 

    Can you please let us know how to solve this issue as soon as possible

    Thanks,
    Armen
  8. Anthony
    Anthony avatar
    108 posts
    Registered:
    29 Sep 2008
    27 Apr 2011
    Link to this post
    Ditto. 

    This just started happening after upgrading from 4.0 to 4.1 this morning.  Any idea on a fix would be great.  Luckily i have not upgraded my production site yet.

    Just a FYI, I ran the upgrade on a test site by just running the upgrade and restarting IIS.  I did not bring down a local copy and compile and redeploy.  I just downloaded the project manager and upgraded and restarted.

    Anthony
  9. Anthony
    Anthony avatar
    108 posts
    Registered:
    29 Sep 2008
    27 Apr 2011
    Link to this post
    FYI,

    The information given to me in another thread solved my problem.

    http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/object-reference-not-set-to-an-instance-of-an-object-in-design-template.aspx
9 posts, 0 answered