We are working in Sitecore 10.3
with SPS 7.0
We are trying to include new publishing target to Sitecore Publishing Service.
We are trying directly on XML files without using Patch to understand the changes so we can patch them later.
Lets say new Publishing Target is Preview.
We duplicated the web database and names as Preview.
We have completed in Sitecore for the new publishing target as per https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-manager/create-a-publishing-target.html
In Sitecore Publishing Service we then added new connection string for Preview DB using
.\Sitecore.Framework.Publishing.Host configuration setconnectionstring Preview "server=xxx;Initial Catalog=Preview;Integrated Security=False;User ID=xxx;password=xxx;MultipleActiveResultSets=True"
In sc.publishing.web.command.service.xml
, sc.publishing.schema.command.services.xml
we added new Target Preview in
Store Factory
<Preview>
<Type>Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data</Type>
<ConnectionNames>
<PreviewDatabase>Preview</PreviewDatabase>
<PreviewResources>PreviewResources</PreviewResources>
</ConnectionNames>
<FeaturesListName>TargetStoreFeatures</FeaturesListName>
<!-- The id of the target item definition in Sitecore. -->
<Id>19B15FB2-4112-4232-9ABB-5BFEE4EF0DAC</Id>
<!-- The name of the Database entity in Sitecore. -->
<ScDatabase>Preview</ScDatabase>
</Preview>
Default Connection Factory we added a new connection
<Preview>
<!-- Should match the name of the publishing target configured in SC. -->
<Type>Sitecore.Framework.Publishing.Data.AdoNet.SqlDatabaseConnection, Sitecore.Framework.Publishing.Data</Type>
<LifeTime>Transient</LifeTime>
<Options>
<ConnectionString>Preview</ConnectionString>
<DefaultCommandTimeout>120</DefaultCommandTimeout>
<Behaviours>
<backend>sql-backend-default</backend>
<api>sql-api-default</api>
</Behaviours>
</Options>
</Preview>
<PreviewResources>
<Type>Sitecore.Framework.Publishing.Data.ResourceItems.ResourceConnection, Sitecore.Framework.Publishing.Data.ResourceItems</Type>
<LifeTime>Transient</LifeTime>
<Options>
<Paths>
<Sitecore>items/sitecore/Preview</Sitecore>
<Modules>items/modules/Preview</Modules>
</Paths>
</Options>
</PreviewResources>
We got the new Publishing Target in Schema List (“Hidden one is newly registered Db for Preview”)
New publishing target is registered
But we are getting in Sitecore as error How to introduce new Publishing target in SPS ?