Resolved: Unable to add a new publishing target in Sitecore 10.3

Posted by

You all must be aware of the term ‘Publishing Target’ and the purpose of creating one, if you are new to that there are quite many articles explaining so, I suggest giving it a quick read first.

So jumping to our problem statement now. We have been working with publishing targets since long now starting Sitecore 7. I was also very clear about the same until I tried doing it in Sitecore 10.3 which has some additional steps, which if not done can land you up with the following error:

Value cannot be null.
Parameter name: item”

Now after encountering this error, like any other developer I searched the community support for the bugfix but to my surprise I couldn’t find any blog which can help me with the solution at the time of writing this post. So here am I to give back to my Sitecore community.

I have laid down the complete steps for adding a new publishing target in Sitecore 10.3, please make sure to follow all the steps to resolve this issue:

  • Deploy a new database in SQL Server
  • Update the ConnectionString.config in our application and add newly deployed database.

    <add name="staging" connectionString="user id=sa;password=sa;Data Source=.;Database=Stagingdb"/>
  • Create a configuration patch file similar to this.
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="">
    <eventing defaultProvider="sitecore">
        <eventQueue name="staging" patch:after="eventQueue[@name='web']" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel">
          <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
          <param hint="" ref="PropertyStoreProvider/store[@name='$(name)']" />
      <store name="staging" patch:after="store[@name='web']" prefix="web_secondary" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.$(database)PropertyStore, Sitecore.Kernel">
        <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
        <param resolve="true" type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" />
        <param resolve="true" type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" />
      <database id="staging" patch:after="database[@id='web']" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel">
        <param desc="name">$(id)</param>
        <dataProviders hint="list:AddDataProvider">
          <dataProvider type="Sitecore.Data.DataProviders.CompositeDataProvider, Sitecore.Kernel">
          <param desc="readOnlyDataProviders" hint="list">
            <protobufItems type="Sitecore.Data.DataProviders.ReadOnly.Protobuf.ProtobufDataProvider, Sitecore.Kernel">
              <filePaths hint="list">
                <modulesFilePath>/sitecore modules/items/$(id)</modulesFilePath>
      <param desc="headProvider">
              <dataProvider ref="dataProviders/main" param1="$(id)">
                <prefetch hint="raw:AddPrefetch">
                  <sc.include file="/App_Config/Prefetch/Common.config" />
                  <sc.include file="/App_Config/Prefetch/Webdb.config" />
        <PropertyStore ref="PropertyStoreProvider/store[@name='$(id)']" />
          <obj ref="eventing/eventQueueProvider/eventQueue[@name='$(id)']" />
        <archives hint="raw:AddArchive">
          <archive name="archive" />
          <archive name="recyclebin" />
        <cacheSizes hint="setting">
  • In the App_Data\items\ folder, make a copy of the Web folder.
  • Rename the copy of the folder and the .dat file inside it. Use the database name for the folder (for example, staging) and use the database name within the file name, so it is like items.staging.dat).
  • Creating new item in master database under “/sitecore/system/Publishing targets”.
  • Add Target Database name in the field (same as database id).
    Once done, navigate to any item and go to publish item.

You will be able to see newly added publishing target.

Happy Coding!

Leave a Reply