2

I have a Community created for external user in my local sandbox, which contains salesforce predefined theme Jepson (we have customized the home page and other tab pages with custom objects as per our requirements). Now I want to migrate this community to other sandbox. I am using Visual Studio Code, when retrieving source in manifest from Org (my local sandbox) I do not see all the customization's applied to the theme and pages were not retrieved. Due to that we are forced to do it manually which is becoming tedious work for us.

Can someone please suggest which is the best possible way of retrieving from one org and migrating to other org.

Thanks in advance.

1

You can try the new ExperienceBundle metadata:

By retrieving the ExperienceBundle type instead of SiteDotCom, you can extract granular community metadata in a human-readable format, and quickly update and deploy Lightning communities programmatically

Here's a sample manifest based on what I've been deploying.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>*</members>
    <name>Audience</name>
  </types>
  <types>
    <members>*</members>
    <name>ContentAsset</name>
  </types>
  <types>
    <members>*</members>
    <name>CustomSite</name>
  </types>
  <types>
    <members>*</members>
    <name>ExperienceBundle</name>
  </types>
  <types>
    <members>*</members>
    <name>FlexiPage</name>
  </types>
  <types>
    <members>*</members>
    <name>NavigationMenu</name>
  </types>
  <types>
    <members>*</members>
    <name>Network</name>
  </types>
  <types>
    <members>*</members>
    <name>NetworkBranding</name>
  </types>
  <version>48.0</version>
</Package>

Note: if you use a TileMenu component on any page, you may run into problems with deployment. Here's the error that I get:

  1. experiences/MyCommunity1 -- Error: We couldn't validate componentAttributes in MyCommunity1/views/home.json for component 4968a79c-1d82-4b46-b1f9-b539cffb43c0. Error: attribute [tileMenuEditor]: The navigation menu Tile_Menu doesn’t exist.. Check your file and try again.

You may have to manually edit any json files in the ExperienceBundle folders to remove references to TileMenu in order to deploy. You can manually add the TileMenu in Community Builder afterwards, or deploy a change set with just SiteDotCom, since that will deploy TileMenu correctly.

| improve this answer | |
  • Is that TileMenu exception tidbit documented anywhere? I'm assuming you're speaking from experience, but that's good to know. – Kris Goncalves Mar 19 at 0:46
  • Not documented, but I should open a case for it since I just realized that ant deployment issues are covered on the Partners portal. – David Cheng Mar 19 at 20:14
0

If you have related Orgs, you can deploy it using Changeset(provided that the community is already present in the destination org with the same name).

Else you can follow the below steps.

You need to fetch all the community components by adding the following details to the package.xml file. You can skip the item that you don't need.

<types>
    <members>yourcommunity</members>
    <name>Network</name>
</types>
<types>
    <members>*</members>
    <name>DataCategoryGroup</name>
 </types>  
<types>
    <members>*</members>
    <name>CustomSite</name>
</types>
<types>
    <members>*</members>
    <name>SiteDotCom</name>
</types>
<types>
    <members>yourtopic</members>
    <name>ManagedTopics</name>
</types>
 <types>
    <members>*</members>
    <name>CommunityTemplateDefinition</name>
</types>

Once you fetch it from one org, setup another VS code project for the destination org. Copy all the items to the new VS code project and deploy.

| improve this answer | |

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.