Thursday, November 1, 2018

Add new Publishing target in SiteCore 9

Leave a Comment
Previously in Sitecore 8 we used to add publishing target by following these three steps:

  1. Add new item under Sitecore->System->Publishing Targets
  1. Update Sitecore.config field to add database configuration section under <databases section for new Publishing Target i.e. WebUAE
  1. Add new connection string setting under ConnectionStrings.config for new web database
However while doing so we received following error:
Could not find configuration node: PropertyStoreProvider/store[@name='WebUAE']
solution:
For sitecore 9 we need to add missing nodes as indicated by error under section PropertyStoreProvider:
<store name="WebUSA" prefix="WebUSA" 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" />
    </store>
But wait, it pops up another error...hmmm Could not find configuration node: eventing/eventQueueProvider/eventQueue[@name='WebUAE']
solution:
Add following node under <eventQueueProvider
<eventQueue name="WebUSA" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel">
        <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
        <param ref="PropertyStoreProvider/store[@name='$(name)']" />
      </eventQueue>
This will fix adding new publishing target for sitecore 9.
Happy development
x

If You Enjoyed This, Take 5 Seconds To Share It

0 comments: