I'm finding it almost impossible to create a Scratch Org and push all code along with an Experience Bundle (Community).

The Community has custom pages that reference Custom Objects in list component.

And since the scratch org is new, it does not have the Custom Objects in it yet.

Though the source we're pushing to the org has all things in tact (all custom objects, fields, pages, network, customsite, navigation profiles etc).

But there is just 1 error that is blocking preparing of the scratch org:

We couldn't validate componentAttributes in <Community_Name>/views/.json for component b14ea887-91e7-4c6a-be73-213785c328cb. Error: attribute [scope]: Specify a valid entity.. Check your file and try again.

The error is pointing towards, a List component on the page that references a custom object (already part of deployment code) but unable to find it during deployment.

And if I remove the component from the file, I get same error but now on different page.

I suspect this would go on an on like this until we remove all custom object references from experience bundle, but then why the references in experience bundle deployment does not detect the objects part of deployment automatically, like all other components do?

It looks like a bug to me. Any insights into it from anyone familiar or how to handle this situation better?


I got my error resolved, but the workaround was not ideal and does not fit an automation CI flow for spinning up a scratch org and push all code to it.

The error is resolved after I make following changes:

  1. Removed Experience Bundle, Network, Network Branding, Custom Site, Content Assets etc. all related community metadata from my repository.
  2. Push rest of my metadata components into the Scratch Org.
  3. Need to Assign Profile Permissions/Permission Sets so that the Administrator User of the scratch org has all Custom Objects visible to him.
  4. Push the community related metadata that was removed earlier in Step #1.

Though, going by this logic, we can never push metadata along with a Community in a Scratch Org since we can't make Permission Set assignment as part of code push.

I mean, why would Salesforce enforce object visibility permissions to an Admin user who is setting up community for other users to also have access to all the Custom Objects himself?

Should this be a bug and need to be taken to Salesforce Support?

(sorry but speaking from experience, SFDC support doesn't take Developer related stuff easy, and require good amount of time to convince them that the issue is platform induced and not developer induced behavior)

  • Can you try to see if you first deploy the object and then the experience bundle and see if it works? If not can you raise a support case. This might be a bug! Commented Feb 9, 2021 at 22:23
  • So if I remove all experience bundle related stuff (like network, experiences, customsite, branding etc), then I'm able to deploy the project, but strangely, if I then try to deploy my whole project again with all objects, code and experience bundle, I'm greeted with same error message. But this time the org has the Custom Object in it already. I did not had issues before in my previous scratch org, but in that scratch org, we built whole project in 30 days time, now on it's expiry we're looking to prepare new org but the same code is not deploying in it at all now.
    – VarunC
    Commented Feb 9, 2021 at 22:48
  • Please raise a case for this! That way it can be investigated to see what can be done! Commented Feb 9, 2021 at 22:50
  • 1
    This is a bug! Kills whole purpose of source driven development! Please raise a case and forward me the case number [email protected] Commented Feb 10, 2021 at 14:49
  • 1
    We've opened a Support Case with Salesforce and have emailed you the Case #. And thanks again for looking into this, very much appreciated!
    – VarunC
    Commented Feb 10, 2021 at 20:12

1 Answer 1


I’m late to the party but I want to share that this problem can indeed be solved in an automated fashion using CumulusCI.

For anyone who’s interested, you’ll need to configure your cumulusci.yml to:

  • Create your scratch org
  • Deploy your metadata
  • Assign permissions
  • Create an empty community with the same API Name as the one you want to deploy
  • Create community owner / other users as needed
  • Publish community
  • Deploy ./unpackaged/config/experience_cloud (this is where I keep all my community metadata. Ymmv)

In my case I modified the “dev_org” flow provided by cci. Works like a charm.

  • Yeah, ideally this is the way. but I'm guessing the underlying bug in platform that restricted my deployment flow has been resolved and so your flow may be working here as expected.
    – VarunC
    Commented Jul 16, 2023 at 19:39

You must log in to answer this question.

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