1

We have a lightning community that is made up of standard pages(Blank standard pages). I want to deploy this community along with all its properties(most importantly pages) from one sandbox to other.

As per this question, we can do it by using metadata API(workbench). Can we do it using change sets? For metadata API I am getting all sorts of unfathomable errors.

Some of them are:

In field: Network - no Network named **** found

In field: Site - no CustomSite named *** found

Cannot find a user that matches any of the following usernames: (some user names); remove the user from the component being deployed or create a matching user in the destination organization.

This is the package XML I am using:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types>
       <members>Landing Page Test</members>
       <name>Network</name>
    </types>
    <types>
       <members>Landing_Page_Test1</members>
       <name>SiteDotCom</name>
    </types>
    <types>
       <members>Landing_Page_Test</members>
       <name>CustomSite</name>
    </types>
    <version>45.0</version>
</Package>

I know as per this , we can deploy communities alongwith its pages. But this article doesn't describe the steps in detail(nor does any other SF documentation)

Using Change Sets

When I try to deploy it through change sets, I could find 'Network' and 'Site.com' as the components to be added in the list. Are these enough or anything more needs to be added? Also, when I went ahead with this and validated in target org I got error as:

enter image description here

More questions:

  1. What should be the value to be specified for tag in package.xml ? I am just adding the label of community now(which can be incorrect).

  2. Which one of SiteDotCom and CustomSite is the 'Sites' that we search in 'quick find' box in setup? And which salesforce entity does the other one represents?

  • do you use page variations in your community? – glls Apr 19 at 13:25
  • @glls : Yes I do. – Sarang Apr 19 at 13:37
  • last i checked, when you push pages to communities with page variations, it will override/break assignments – glls Apr 19 at 14:10
0

Maybe you just missed the doc, but there are 2 articles that details the steps and gotchas for deploying communities:

  • Create a change set, and click Add in the Change Set Components section.
  • Select the Network component type, choose your community, and then click Add to Change Set.
  • To add dependent items, click View/Add Dependencies. select all the dependencies listed.

Deploy Your Community with Change Sets

Considerations for Deploying Communities with Change Sets

  • I did went through these docs, it instructs to add only 'Network' type of component. When I do that and click on View/Add dependencies it shows me all the components available in my org! Also it does not instruct anywhere in this doc that we should add 'SiteDotCom' component or not. If I only deploy 'Network' type of component, it give me the error as mentioned above, that 'No CustomSite with name....found' – Sarang Apr 22 at 4:21
0

I could achieve this using Metadata API via Workbench. Following is the major error that I received at first:

cannot find a user that matches any of the following usernames: abc@xyz.com, abc2@xyz.com; remove the user from the component being deployed or create a matching user in the destination organization.

To resolve this, we need to create/edit existing user to match the 2 usernames between target and source orgs. This resolved the issue.

I used following package.xml for deployment

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types>
       <members>Landing Page Test</members>
       <name>Network</name>
    </types>
    <types>
       <members>Landing_Page_Test</members>
       <name>CustomSite</name>
    </types>
    <types>
       <members>Landing_Page_Test1</members>
       <name>SiteDotCom</name>
    </types>
    <version>45.0</version>
</Package>

What I am still unsure about this is that how to get value of 'SiteDotCom' type of component in my org(assuming that CustomSite is the one that we get after navigating to 'Sites' from setup). However, I was getting error during deployment as :

no SiteDotCom with name Landing_Page_Test1 found.

To which, I modified the package.xml to include it and it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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