2

I want to be able to change the display name of the publishing target item and not change the item name as follows:

enter image description here

In the config/global folder for the Sitecore Publishing Service, there is a XML file to apply the additional publishing targets. Below is an example leaving out some of the other targets:

<Settings>
  <Sitecore>
    <Publishing>
      <Services>
        <StoreFactory>
          <Options>
            <Stores>
              <Targets>
                <!--Additional targets can be configured here-->
                <Production_DR>
                  <Type>Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data</Type>
                  <ConnectionName>DisasterRecovery</ConnectionName>
                  <FeaturesListName>TargetStoreFeatures</FeaturesListName>
                  <!-- The id of the target item definition in Sitecore. -->
                  <Id>964c28ac-46be-409a-8ff8-ba5412694a2b</Id>
                  <!-- The name of the Database entity in Sitecore. -->
                  <ScDatabase>disaster_recovery</ScDatabase>
                </Production_DR>                    
             </Targets>
            </Stores>
          </Options>
        </StoreFactory>
      </Services>
    </Publishing>
  </Sitecore>
</Settings> 

After changing the display name from Production_DR to Production Disaster Recovery, publishing fails for that specific target:

enter image description here

I understand that the targets configured for Sitecore Publishing Service must match the publishing targets in Sitecore. Is there another way to achieve the same results? Or, how would you configure publishing targets that have spaces in the name?

1 Answer 1

1

Edit 14/6/17: This has indeed been fixed in v2.0 Update 1 (release notes)

This is a bug - the UI should use the Publishing Target Item name, not display name, when queuing the job. . We will aim to fix this in the upcoming release ("2.0 Update 1", May-ish 2017).

To work around this problem in the mean time, you could provide your configuration in JSON form, this will allow you to provide the Target display name with spaces. (Obviously this won't be good enough if you want to set different display names across multiple languages.)

For example, you would provide a file, e.g. 'sc.publishing.custom.Targets.ProductionDR.json', with the following contents:

 {
  "Sitecore": {
    "Publishing": {
      "Services": {
        "StoreFactory": {
          "Options": {
            "Stores": {
              "Targets": {
                "Production Disaster Recovery": {
                  "Type": "Sitecore.Framework.Publishing.Data.TargetStore, Sitecore.Framework.Publishing.Data",
                  "ConnectionName": "DisasterRecovery",
                  "FeaturesListName": "TargetStoreFeatures",
                  "Id": "964c28ac-46be-409a-8ff8-ba5412694a2b",
                  "ScDatabase": "disaster_recovery"
                }
              }
            }
          }
        }
      }
    }
  }
}
1
  • To get this to work, the proposed JSON file was created. Publishing target items were renamed with spaces (both item name and display name). The publishing service recognized them and publishing worked. Commented May 1, 2017 at 21:03

Your Answer

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

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