We are attempting to deploy a community (ExperienceBundle) through an Unlocked Second-Generation Package. The package will create fine but once we install it in an org, we get the following error message:

"(CommunityName) Required fields are missing: [ParentId], Details: CommunityName: Required fields are missing: [ParentId]"

I could also reproduce this with a minimum viable community that just has a tile menu and image.

I have looked through the metadata documentation for all of the required objects and cannot find a ParentId field on anything (ContentAsset, ExperienceBundle, NavigationMenu, Network, SiteDotCom, Site etc.).

Has anyone been able to successfully deploy a community through unlocked packages?

  • i think the experiencebundle is not allowed for unlocked or managed packages still. maybe this document is out of date but it's from SF themselves: developer.salesforce.com/docs/… Apr 2 '20 at 17:01
  • I'm hitting this error too. I don't have a solution, however, when going to my install url for my package and viewing the list of included components, not only is my community not included, but every other component that is listed as a "non-namespace" component in the Metadata Coverage report is also left out from my package(ApprovalProcess, Network, CustomSite, etc.). I've verified that I created a package and package version without a namespace, so I'm not sure why these components are being left out. Apr 28 '20 at 21:49
  • We have the same issue and opened Case #26307915 with Salesforce Support. Apr 29 '20 at 8:05

If you have enabled the ExperienceBundle Metadata API in the Dev Hub and you're still getting this error, remove the <networkMemberGroups> from the Network file of your Community. Due to a bug this doesn't work when combined with the ExperienceBundle, and it will throw this (nondescript) error.

  • 1
    Unlike @RobertSosemann I found the enabling of the experience bundle metadata API on our dev hub to have no effect and was forced to remove my packaged profiles from the network member groups as suggested here - NB: I didn't remove this element, but instead removed the packaged profiles from it.
    – Phil W
    May 16 '21 at 21:38
  • 1
    Ditto with @PhilW, although we only had to remove <profile>admin</profile> from within the <networkMemberGroups> element. Dec 6 '21 at 16:37

After a painful 2 week trial and error dance with Salesforce Support (Case: #26307915), we learned that we have to do something very unintuitive.

It's a setting in the Dev Hub org which needs to be enabled.

Setup > Communities Settings > Enable ExperienceBundle Metadata API

enter image description here

We don't know why and it even worked after we disabled it.

  • 1
    @Robert Sosemann -- Are you sure about this recommendation? I could see the need to enable experience bundle in the subscriber org but it makes no sense that you need to enable it in the DevHub. Feb 3 '21 at 19:38
  • Yes that solved the issue. Feb 3 '21 at 19:40

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.