Error on Page Create. "Object reference not set to an instance of an object."
Hi guys,
I had everything fine up til I deployed my solution. Its giving me error 'Object reference not set to an instance of an object.' on alert when I add a translation page (see CreatePage.png):
Following is the request that I copied from browser HTTP request inspection console.
GET mydomain.com/.../ 500 (Object reference not set to an instance of an object.)
Hello Saad,
Can you tell me how did you managed to deploy your website? Prior to deploying it did you experience any problems publishing a page? When did you noticed the appearance of the empty page? The problem is probably coming of false records in your database, which might be related to the empty page.
Regards,
Victor Velev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Before deployment I did change few templates of all the pages I had on the site. The way I did this could be wrong that I excluded those masterpages from my solution and referred all the pages with the newly added templates one by one.
From that time, I had this empty page but only for one page while others did not come out with any problems. And I didn`t face any problem in adding/editing a page of different translations.
I wasn`t bothered with that empty page but after deployment I started having this problem in adding/editing pages other than default language (that is English in my case).
I executed the statement below to see if there is any false page. It gave me 5-6 rows.
SELECT
*
FROM
[dbo].[sf_draft_pages]
WHERE
page_id
IS
NULL
Hello Saad,
Have you tried associating the pages to the new template and excluding the old masterpages afterwards? The issue may be a result of some false records left in the database as the query suggests. Also have you tried removing the records?
Regards,
Victor Velev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Yes, I associated all the pages with new templates and excluded old templates from solution and as well as deleted from Sitefinity Backend.
I did not try removing the false records as its on production server right now and I don`t want it to be messed up.
Now, I deleted all the pages and tried recreating them. But I am facing this again!!!
Anyone??
Here is the trace:
<
E2ETraceEvent
xmlns
=
"http://schemas.microsoft.com/2004/06/E2ETraceEvent"
>
<
System
xmlns
=
"http://schemas.microsoft.com/2004/06/windows/eventlog/system"
>
<
EventID
>131076</
EventID
>
<
Type
>3</
Type
>
<
SubType
Name
=
"Error"
>0</
SubType
>
<
Level
>2</
Level
>
<
TimeCreated
SystemTime
=
"2011-09-06T11:17:32.1930345Z"
/>
<
Source
Name
=
"System.ServiceModel"
/>
<
Correlation
ActivityID
=
"6dcdc518-c460-4bdf-8251-9f9e3d2df201"
/>
<
Execution
ProcessName
=
"w3wp"
ProcessID
=
"5092"
ThreadID
=
"7"
/>
<
Channel
/>
<
Computer
>STAGING</
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/11505164/Root/1410-7-129597811848312809</
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.PageViewModel..ctor(PageNode pageNode, PageDataProvider provider, Boolean resolveToUserCreatedNode, Boolean excludeDecisions)
at Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.GetPagesInternal(PageLocation location, String pageFilterString, String sortExpression, Int32 skip, Int32 take, String filter)
at Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.GetPagesInternal(Boolean hierarchyMode, String root, String pageFilter, String sortExpression, Int32 skip, Int32 take, String filter)
at Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.GetPages(String pageFilter, Boolean hierarchyMode, String sortExpression, Int32 skip, Int32 take, String filter, String root)
at SyncInvokeGetPages(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& 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.PageViewModel..ctor(PageNode pageNode, PageDataProvider provider, Boolean resolveToUserCreatedNode, Boolean excludeDecisions)
at Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.GetPagesInternal(PageLocation location, String pageFilterString, String sortExpression, Int32 skip, Int32 take, String filter)
at Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.GetPagesInternal(Boolean hierarchyMode, String root, String pageFilter, String sortExpression, Int32 skip, Int32 take, String filter)
at Telerik.Sitefinity.Modules.Pages.Web.Services.PagesService.GetPages(String pageFilter, Boolean hierarchyMode, String sortExpression, Int32 skip, Int32 take, String filter, String root)
at SyncInvokeGetPages(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</
ExceptionString
>
</
Exception
>
</
TraceRecord
>
</
DataItem
>
</
TraceData
>
</
ApplicationData
>
</
E2ETraceEvent
>
Hello Saad,
The stack trace does not seem to contain enough information to diagnose the issue. Can you login in the backend of the website and try to create a page - then attach the trace log and send it to me so I can have a closer look at the service exceptions ( if the system caught any ). After you send me the tracelog I will analyze it and report back to you my findings.
Best wishes,
Victor Velev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Hello Victor,
Below is the trace log download link. Please let me know what is going wrong here. Our client is questioning us this and we have no answer.
http://bit.ly/oCU9IT
Hi Saad,
I have looked through the tracelog and the issue seems to be related to the records in the database - can you please attach your project ( codebase and database ) and send it to us so we can attach it to our installaitons and find the origin of the error message that is thrown.
Kind regards,
Victor Velev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Is there an update on this? I have the same error and need to fix this.
Hi Don,
Please send me a tracelog ( as explained in my previous post ) so I can have a look at the service exceptions.
All the best,
Victor Velev
the Telerik team
Thanks! I uploaded the file requested on ticket 464871.
Hello Don,
Great! I will review the tracelog and get back to you in the support ticket.
Regards,
Victor Velev
the Telerik team