7

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?

3
  • 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/… Commented Apr 2, 2020 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. Commented Apr 28, 2020 at 21:49
  • We have the same issue and opened Case #26307915 with Salesforce Support. Commented Apr 29, 2020 at 8:05

2 Answers 2

7

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.

3
  • 2
    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
    Commented May 16, 2021 at 21:38
  • 2
    Ditto with @PhilW, although we only had to remove <profile>admin</profile> from within the <networkMemberGroups> element. Commented Dec 6, 2021 at 16:37
  • Same here, no effect from the experience bundle metadata API, I just had to remove the profile, did not need to remove the permission set though.
    – manubkk
    Commented Oct 18 at 3:46
4

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.

2
  • 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. Commented Feb 3, 2021 at 19:38
  • Yes that solved the issue. Commented Feb 3, 2021 at 19:40

You must log in to answer this question.

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