1

trying to migrate a community from one sandbox to another. Using SFDX and VSC. I do have ExperienceBundle enabled in both. When I run this command:

sfdx force:source:deploy -p force-app\main\default\experiences,force-app\main\default\networkBranding -u DevSand1 -l RunSpecifiedTests -r RunningTest -c

Getting back this Error:

Component names can only contain alphanumeric characters, hyphens, colons, and underscores. Correct label in Community_C/brandingSets/brandingSet.json and try again.

My brandingSet.json looks like this:

  "definitionName" : "napili:branding-napili",
  "id" : "235b0b8d-2fe0-402c-9d29-6c3c8e222349",
  "label" : null,
  "type" : "brandingSet",
  "values" : {
    "ActionColor" : "rgb(246, 128, 38)",
    "BorderColor" : "rgb(221, 221, 221)",
    "CompanyLogo" : "/sfsites/assets/Images/spacer.gif",
    "DetailTextColor" : "#696969",
    "HeaderFonts" : "Open Sans",
    "HeaderImage" : "/file-asset/header_graphic?v=1",
    "LinkColor" : "rgb(246, 128, 38)",
    "OverlayTextColor" : "rgb(255, 255, 255)",
    "PrimaryFont" : "Open Sans",
    "TextColor" : "#333",
    "TextTransformStyle" : "capitalize",
    "_ActionColorDarker" : "#e06609",
    "_ActionColorTrans" : "rgba(246, 128, 38, 0.9)",
    "_HoverColor" : "rgba(246, 128, 38, 0.1)",
    "_LinkColorDarker" : "#e96b0a"
  }
}

And this is my Pacage.xml

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>                 
        <name>FlexiPage</name>
    </types>
    <types>
        <members>Community</members>
        <name>CustomSite</name>
    </types>
    <types>
        <members>Community_C</members>
        <name>ExperienceBundle</name>
    </types>
    <types>
        <members>Community</members>
        <name>Network</name>
    </types>
    <types>
        <members>Community_C</members>
        <name>SiteDotCom</name>
    </types>
    <types>
        <members>*</members>
        <name>NetworkBranding</name>
    </types>
  <version>52.0</version>
</Package>

3 Answers 3

0

There are a couple of issues here

  1. You do not need SiteDotCom when deploying the experience bundle. The custom site Metadata would be sufficient. So remove it as that's not needed and may cause an issue.

  2. The error clearly says the label needs a value, hence use the below for label and do not keep it null.

    "label" :"Napili Community",

2
  • I already tries adding some name to the Label and it did not work. Even after I try "Napili Community", still no luck.
    – Art S
    Jul 8, 2021 at 15:28
  • @Art S Are you getting the same error here? Jul 8, 2021 at 16:18
0

Was able to deploy by disabling "ExperienceBundle Metadata API" setting in Experience settings in Salesforce. And after that I modified the package.xml to exclude ExperienceBundle and added a couple other things. This way deployed worked.

<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>                 
        <name>FlexiPage</name>
    </types>
    <types>
        <members>Community</members>
        <name>CustomSite</name>
    </types>
    <types>
        <members>Community_C</members>
        <name>SiteDotCom</name>
    </types>
    <types>
        <members>Community</members>
        <name>Network</name>
    </types>
    <types>
        <members>*</members>
        <name>NetworkBranding</name>
    </types>
  <version>51.0</version>
</Package>
1
  • Disabling Experience Bundle means you are using Blob format and that's not readable. I suggest raising a support case so the product can be improved. Jul 12, 2021 at 1:04
0

According to Salesforce, the use of SiteDotComSite Metadata Type is considered deprecated in favour of experience bundle. That said, you still may use SiteDotComSite (excluding) OR ExperienceBundle metadata type. Source: https://help.salesforce.com/s/articleView?id=sf.networks_migrating_from_sandbox.htm

Nonetheless, the deployment of ExperienceBundle WILL fail if the underlying SiteDotComSite developer name (which is equals to the directory name of each experience bundle contained in the "experiences" directory of a SFDX project) contain underscores ("_"). Unfortunately, "legacy" SiteDotComSites metadata types were autocreated with an underscore (i.e. "SiteName_C") in the past, which makes migration to experience bundles pretty hard. Even worse, the deployment error messages, as always, are basically a shit.

My Workaround for now is to just rename the experience bundle from "SiteName_C" to "SiteName1" and then change the contents of the <picassoSite></picassoSite> reference in the underlying Network metadata file to match the new name, for instance <picassoSite>SiteName1</picassoSite> insteadof <picassoSite>SiteName_C</picassoSite>. Hope that this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .