2016-04-06 13:22:11,284 [87] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 72] An unhandled exception occurred
System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Web.PublishedContentExtensions.
Could it be that the application tries to redirect to a 404 page that does not exist and therefor gets a nullreferenceexception? Do you have a correct Id specified in your umbracoSettings.config error404?
I see you are using UrlTracker. This text is from their settings page:
I have added hostnames to my root nodes, but I can't select a root node in the Url Tracker?
Ensure the application pool has been recycled after adding new
hostnames.
Try to recycle the app pool and se if that works.
Otherwise, try to disable UrlTracker like this:
urlTracker:disabled
Set to true in your web.config to disable the HTTP Module of the Url Tracker, so it won't redirect requests anymore.
I think the CreateFooterModel is a custom method so i dont know where its located, but if you are using Visual Studio you can right click on the method and select "Go to definition".
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.Web.UmbracoContext.get_UmbracoUser() +10
Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.<get_GetXmlDelegate>b__3(UmbracoContext context, Boolean preview) +91
Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.GetXml(UmbracoContext umbracoContext, Boolean preview) +150
umbraco.presentation.UmbracoContext.GetXml() +189
umbraco.library.GetXmlNodeById(String id) +36
umbraco.NodeFactory.Node..ctor(Int32 NodeId) +492
InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerDomain.get_Node() +33
InfoCaster.Umbraco.UrlTracker.Models.UrlTrackerDomain.get_UrlWithDomain() +43
InfoCaster.Umbraco.UrlTracker.Modules.<>c__DisplayClass4.<UrlTrackerDo>b__2(UrlTrackerDomain x) +26
System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +168
InfoCaster.Umbraco.UrlTracker.Modules.UrlTrackerModule.UrlTrackerDo(String callingEventName, Boolean ignoreHttpStatusCode) +1075
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +91
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164
I had the old site in a zip folder.
I recreated the site and he DB.
The I changed the global site host name to /old,
And the Chinese site to be root site.
I still cant find the: CreateFooterModel class/function anywhere.
Where can it be?
I actually have no idea sorry. I sounds like a custom method but i could be wrong. You can´t search your entire solution in Visual Studio for "CreateFooterModel"?
Preview page is working but on live site it gets error
Hey there I have a site: http://www.insightec.cn/
On the admin when i preview pages all works grate But on the live site I get erorr;
Object reference not set to an instance of an object.
What can be the problem.
Thank you. Dan
This is the log:
2016-04-06 13:22:11,284 [87] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 72] An unhandled exception occurred System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Web.PublishedContentExtensions.
Could it be that the application tries to redirect to a 404 page that does not exist and therefor gets a nullreferenceexception? Do you have a correct Id specified in your umbracoSettings.config error404?
The home page is not soposed to redirect to page 404 In the preview it is working grate.
The umbracoSettings.config 404 is set like this:
Is this good?
Is your homepage published? If not that would explain why it would work in preview but not live, and it would redirect to a 404 page.
Try replacing the value
1
in your error404 with an id of a published page and se if it works.Hey Dennis,
Yes the home page is published.
When I change the ID to another page I get this Error:
I deleted the App_Data\cache Now I get this error:
And the log:
How does your
CreateFooterModel()
code look like?Replace:
With:
EDIT: I still think you have to examine you CreateFooterModel() code since something seems to be broke in there.
Where is the CreateFooterModel() code located?
The site was originally working under: http://www.insightec.cn/cn. It was working grate.
My client wanted it to be on the root: http://www.insightec.cn/. So I changed the Culture and Hostnames then it all went south...
I see you are using UrlTracker. This text is from their settings page:
Try to recycle the app pool and se if that works. Otherwise, try to disable UrlTracker like this:
urlTracker:disabled Set to true in your web.config to disable the HTTP Module of the Url Tracker, so it won't redirect requests anymore.
I think the CreateFooterModel is a custom method so i dont know where its located, but if you are using Visual Studio you can right click on the method and select "Go to definition".
Ok I recycled the application pool.
Now there is no error.
BUT I get page 404 on all pages...
See this http://www.insightec.cn/
Try navigating the to menu
We´re getting closer.. :)
Try republish the entire site: www.insightec.cn/Umbraco/dialogs/republish.aspx
Damn!
Now I get this error on all pages:
Stack Trace:
Did you try to disable UrlTracker?
I did not find the: UrlTracker in the web.config file Are you sure it is there?
You´ll probobly have to add it yourself as a appSetting. Se image:
https://msdn.microsoft.com/en-us/library/aa903313%28v=vs.71%29.aspx
OK I added:
Now I get this error:
Source File: c:\inetpub\wwwroot\www.insightec.cn\Views\Partials_Footer.cshtml Line: 4
Stack Trace:
Ok well it seems that something in the Model.CreateFooterModel(); method breaks, and its hard to see what it is since you dont find the code.
Could you try to uncomment the whole _Footer.cshtml partial from your layout, just to see if it starts working?
OK I comment all the footerModel in the footer file.
Then I republished the site
Then I recycled the application pool
Now I get in all the pages page 404.
Turn off customerrors in your web.config.
It is now on off:
Hi Dan. Sorry that i stopped supporting yesterday, i got off work and where nowhere near a computer for the rest of the day.
I see that your site is working now, thats great news. What solved it? Was it the UrlTracker or something different?
I had the old site in a zip folder. I recreated the site and he DB. The I changed the global site host name to /old, And the Chinese site to be root site.
I still cant find the: CreateFooterModel class/function anywhere. Where can it be?
Thanks for the help.
I actually have no idea sorry. I sounds like a custom method but i could be wrong. You can´t search your entire solution in Visual Studio for "CreateFooterModel"?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.