0

We are using DNN with 2sxc installed, and when we go to a URL where we would expect to see a page with content on our website, we see the following error message. Please can someone tell us what is wrong and how to fix it? Thank you in advance.

Error: System.NullReferenceException: Object reference not set to an instance of an object. at ToSic.Sxc.Data.DynamicEntity.get_EntityTitle() in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\Data\DynamicEntity\DynamicEntity.cs:line 61 at ASP._Page_Portals_0_2sxc_Newsroom__SharingButtons_cshtml.Execute() in n:\APSDNN\Portals\0\2sxc\Newsroom_SharingButtons.cshtml:line 84 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.WebPages.WebPageBase.<>c__DisplayClass7.b__6(TextWriter writer) at System.Web.WebPages.WebPageBase.Write(HelperResult result) at ASP._Page_Portals_0_2sxc_Newsroom__IndividualArticle_cshtml.Execute() in n:\APSDNN\Portals\0\2sxc\Newsroom_IndividualArticle.cshtml:line 254 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at ToSic.Sxc.Engines.RazorEngine.Render(TextWriter writer) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Razor\Engines\Razor\RazorEngine.cs:line 72 at ToSic.Sxc.Engines.RazorEngine.RenderTemplate() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Razor\Engines\Razor\RazorEngine.cs:line 82 at ToSic.Sxc.Engines.EngineBase.Render() in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\Engines\EngineBase.cs:line 147 at ToSic.Sxc.Blocks.BlockBuilder.RenderInternal() in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\Blocks\BlockBuilder_Render.cs:line 113

Originally, we had an app with inputs and we input content data that would output a formatted out web page, but it seems to have become broken somehow, sometime after it's creation/posting/publishing.

pingspike
  • 1
  • 2
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Apr 23 '23 at 17:05
  • A colleague provided comments to the error msg in "". Error: System.NullReferenceException: "Object reference not set to an instance of an object. This is the most common error type; the code has tried to call a value that doesn't exist." at ToSic.Sxc.Data.DynamicEntity.get_EntityTitle() "This tells you what value was being called in >>" C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\Data\DynamicEntity\DynamicEntity.cs:line 61 "This tells you the file location and the line of code that the error occurred on. The remainder of the error report tells you what called the file that failed." – pingspike Apr 25 '23 at 17:06

1 Answers1

0

It appears that on n:\APSDNN\Portals\0\2sxc\Newsroom_IndividualArticle.cshtml:line 254 you are accessing something like Content.EntityTitle or something, but Content (or whatever name it has) is null. Find out where the main object comes from, and why it's empty.

iJungleBoy
  • 5,325
  • 1
  • 9
  • 21