I am working on a new implementation of Communities for a project using SFDX. I pulled in the relevant files related to hosting a community but when I do a sfdx force:source:push I get an error on the Community Profile.profile-meta.xml:

"In field: userLicense - no UserLicense named Guest found"

If I go through some manual steps, I can then push the source but I am hoping to use an automated CI to validate tests before installing the package to our dev Org.

Is there any setting to automatically publish the community and give the community Guest User Profile?

Or some way to get around this so I can run our tests in a scratch org in CI before having the CI install the package to our dev org?

Any help would be greatly appreciated, thank you!


Thanks to the hint from Mohith Shrivastava I managed to get rid of this error message by using scratch org definition file with Communites and Sites and Networks enabled:

    "orgName": "Demo Company",
    "edition": "Developer",
    "features": ["Communities", "Sites"],
    "settings": {
        "orgPreferenceSettings" : {
            "s1DesktopEnabled": true,
            "networksEnabled": true
| improve this answer | |
  • Does the edition matter? I'm unable to push these profiles into an Enterprise edition org. – Kai Tribble Jun 10 '19 at 18:17
  • Enterprise edition scratch org had issues when work with communities – sdandamud1 Oct 22 '19 at 23:20

One thing you can do here is to use .forceignore and add the Guest User Profile there so it does not gets deployed to scratch org

Here is the .forceignore file

force-app/main/default/profiles/Community Profile.profile-meta.xml

This will make sure your errors are gone .I think scratch orgs do not automatically gets sites enabled causing the issue .

| 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.