1

Publishing of Navigation Page in DXA Publication throws the following error:

Object reference not set to an instance of an object.

When I previewed a Navigation configuration Component I get the following details:

<tcm:Error ErrorCode="80040356" Category="18" Source="Kernel" xmlns:tcm="http://www.tridion.com/ContentManager/5.0"><tcm:Line ErrorCode="80040356" Cause="true"></tcm:Line></tcm:Error>

Page publish was working before, not sure what change made this happen. There is no metadata configured for that Publication.

here is a stack trace:-

  

at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)    at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)    at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)    at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)    at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)    at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)    at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)    at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)    at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)    at Tridion.ContentManager.Templating.Engine.TransformPackage(Template template, Package package)    at Tridion.ContentManager.Templating.Engine.TransformItem(Template template, IdentifiableObject itemToRender)    at Tridion.ContentManager.Templating.TemplatingRenderer.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderedItem renderedItem, RenderContext renderContext)    at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(ResolvedItem resolvedItem, PublishInstruction instruction, PublicationTarget target, RenderContext context)    at Tridion.ContentManager.Publishing.Rendering.RenderEngine.Render(IdentifiableObject item, Template template, PublishInstruction instruction, PublicationTarget target, RenderContext context)    at Tridion.ContentManager.Templating.Engine.RenderComponentPresentationAsRenderedItem(TcmUri componentUri, TcmUri componentTemplateUri)    at Tridion.ContentManager.Templating.Engine.RenderComponentPresentation(TcmUri componentUri, TcmUri componentTemplateUri)    at Sdl.Web.Tridion.Templates.RenderComponentPresentations.Transform(Engine engine, Package package)    at Tridion.ContentManager.Templating.Assembly.AssemblyMediator.Transform(Engine engine, Template template, Package package)    at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.RunTemplate(Engine engine, Package package, String templateUri, String className)    at Tridion.Templating.CSharpTemplate.CSharpSourceTemplate.Transform(Engine __engine, Package __package)    at Tridion.ContentManager.Templating.Assembly.CSharpSourceCodeMediator.Transform(Engine engine, Template template, Package package)    at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package)    at Tridion.ContentManager.Templating.Engine.InvokeTemplate(Package package, TemplateInvocation templateInvocation, Template template)    at Tridion.ContentManager.Templating.Compound.CompoundTemplateMediator.Transform(Engine engine, Template templateToTransform, Package package)    at Tridion.ContentManager.Templating.Engine.ExecuteTemplate(Template template, Package package) Event Xml:100200x8000000000000015667123Tridiondummy.comObject reference not set to an instance of an object.

6
  • Did you try running this page in TemplateBuilder using debug mode? this should give more info Feb 3, 2023 at 9:34
  • you should check logs in event viewer of the publisher. It normally has a full stack trace. This is a classic null pointer exception so you need stack trace to see what is being null in rendering
    – Marko Milic
    Feb 3, 2023 at 10:02
  • Hi @shahid and marko i just edited my question and attached stack trace.
    – Navneet
    Feb 3, 2023 at 10:32
  • ok so it means your code is trying to read metadata. please check in code where are you reading it. since metadata is not mandatory, you need to check if it is not null before reading it.
    – Marko Milic
    Feb 3, 2023 at 10:55
  • Hi @marko we have already checked this point but no luck.
    – Navneet
    Feb 3, 2023 at 11:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.