Page Templates - "Object Reference Not set to and instance of an object"
I created a new site with SF 4.1. I have been using the same two templates for a few days now and everything has been fine. Today I created a new template based off another template and now I am unable to access page templates entirely. I just get spammed with alerts for "object reference not set to an instance of an object". Trying to use firebug is near impossible due to the error continually spamming, but I did manage to see it is throwing a 500 server error.
Please enable the service tracer
and send the file to us. It will provide some more details about the actual error and what is the reason for it.
Please check the the template you have created is not based on itself. We have this bug in the previous release SP1.
the Telerik team
The new template I made prior to this is not based on itself. I looked
at the page templates table and it is inheriting from the masterpage
template that I uploaded a few days ago.
I have a base template which is the master page. Nothing unusual with it. Just using content placeholders and normal html markup. The other templates are based off this template.
I have submitted the trace file through your ticketing system and referenced this post in the ticket.
Here is something I found when looking through the trace.
I still have not resolved this, but want to keep posting what I am finding. There is not much else I can do at this point, but keep trying to dig.
All my pages are still working and they are still displaying according to the templates they are assigned to. I started looking more into the tables to see what I can find.
I did a query on the sf_draft_pages table by the template_id of the new template that all this mess seem to be stemming from. Now from what I can tell, I do not have a page that is still a draft when I look via the interface, but I do get 1 result back on the query.
I then took the page_id from this and checked against the sf_page_node table. I do not get any results back on this. Am I looking at this the right way and if so should I try to remove the record in the sf_draft_pages table? I have a backup of the db.
Did you find any solution for this issue?
I'm getting the same js alert indicating "object reference not set to an instance of an object" in my Page Templates section, and doesn't show my templates.
In my test, this seems to be an DB issue, because when I access to my Page Templates Service (mydomain.com/.../) it shows "Detail":"Object reference not set to an instance of an object."
Any help will be really appreciated.
I am still trying to get this one taken care of. I received a reply from Sonya via the support ticket system with a script to run, but it had no effect on my problem. I am waiting for another response on this and hope to hear something very soon. I need to launch my site by the end of this week and not being able to access my design templates is a huge time sink.
Let me know if you come up with something and I will do the same here.
Thanks for you replay. Could I check the script sent to you via the support ticket?
I only found
I actually had found the same post you are referring to and I too did not have any records in sf_page_drafts that had a null page_id.
Here is what was sent to me based on the support ticket I sent with the svc trace. My installation for this site was brand new as 4.1 and not an upgrade. My masterpage file has content placeholders and nothing else in it. I registered this template and used it without issues for 3 days. I had a second template that used the master as a base. Both these templates worked fine. Then I created a third template and again used the master as the base. I then created a new page and based it of the third template. At this point I could no longer get into page templates without the error message.
"There is an issue with upgrade of content blocks in Page Templates. Do you have content blocks in your master template?
I finally could fix this error. I found the solution in this post: www.sitefinity.com/.../object-reference-not-set-to-an-instance-of-an-object-in-design-template.aspx
Hope this help you!
Thanks for directing me to that post. I too, was able to fix my issue by following that post. I also found the cause, for me at least, was that going from a normal page with content to a group page will cause this error.