1

Publishing Settings Page in DXA Publication throws following error in Core component:

Value cannot be null. Parameter name: schema.

When I previewed a Module configuration Component I get following details:

(80040356) <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> Value cannot be null. Parameter name: schema.

When I run through Core Component in Template Builder, I get the following error stack in Publish Configuration TBB. Settings Page publish was working before, not sure what change made this happen. There is no metadata configured for that Publication.

Value cannot be null.
Parameter name: schema.
at Tridion.ContentManager.ContentManagement.Fields.ItemFields..ctor(XmlElement rootElement, Schema schema, Nullable`1 synchronizeFlags, LoadFlags loadFlags)
at Sdl.Web.Tridion.Templates.PublishConfiguration.GetSiteIdFromPublication(Publication startPublication)
at Sdl.Web.Tridion.Templates.PublishConfiguration.DetermineSiteLocalizations(Publication contextPublication)
at Sdl.Web.Tridion.Templates.PublishConfiguration.PublishLocalizationData(IEnumerable`1 binaries, Component relatedComponent)
at Sdl.Web.Tridion.Templates.PublishConfiguration.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)
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.Debugging.DebuggingEngine.Run()
at Tridion.ContentManager.Templating.Debugging.DebugSession.Run()

1 Answer 1

2

The Stack Trace pretty much tells you where the problem lies:

  • The error occurs in the PublishConfiguration TBB
  • It’s trying to publish “Localization Data”
  • For that purpose, it tries to determine the “Site Localizations” (i.e. related Publications in a BluePrint)
  • It tries to obtain a “Site ID” from a Publication.
  • This tries to construct a TOM.NET ItemFields object, but apparently with a null value for the schema parameter.

The Stack Trace also tells you where that is in the DXA Source code: Sdl.Web.Tridion.Templates.PublishConfiguration.GetSiteIdFromPublication

If you check what that method does, it creates a TOM.NET ItemFields object for the Publication’s metadata fields, based on its metadata Schema.

Apparently, one of your Publications doesn’t have its metadata Schema set, but it does have metadata fields, which confuses the DXA TBB.

1
  • Thanks ! Rick, yes the stack trace gave those detail but there was no metadata schema set for any of the publications. After your response I tried set a metadata schema (publication metadata) and saved the publication properties and revert back to none to save it back as original. That resolved the issue.
    – swami
    Jan 11, 2021 at 16:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.