Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force:source:pull "no results found" after adding profiles as a community member #392

Closed
vviotto-masti opened this issue May 5, 2020 · 2 comments
Labels
area:communities bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.

Comments

@vviotto-masti
Copy link

vviotto-masti commented May 5, 2020

Summary

force:source:pull Fails to pull changes to the 'network' metadata after adding profiles or permission sets as members of a community

Steps To Reproduce:

  1. Create a community.
  2. Create a custom profile or permission set
  3. Go to Setup -> Communities -> All communities and click the 'workspace' link for the newly created community
  4. Click Administration -> Members
  5. Add the newly created profile or permission set to the community and save (Problem occurs with standard profiles too)
  6. execute the force:source:pull on the command line

Expected result

network metadata pulled from the scratch org with the 'networkMemberGroups' tag updated with the new profile or permission set

Actual result

No results found, after pull command is executed

Additional information

Using force:source:retrieve instead of pull correctly retrieves the change

SFDX CLI Version(to find the version of the CLI engine run sfdx --version): 7.54.4

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.2.3 (core)
@oclif/plugin-help 2.2.3 (core)
@oclif/plugin-not-found 1.2.3 (core)
@oclif/plugin-plugins 1.7.9 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.7.1 (core)
generator 1.1.2 (core)
salesforcedx 48.10.1 (core)
├─ salesforcedx-templates 48.8.0 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.5 (core)
└─ salesforce-alm 48.10.0 (core)

OS and version: Win 10

@clairebianchi clairebianchi added bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. labels May 5, 2020
@iowillhoit
Copy link
Contributor

This appears to be (partially) fixed. Steps I took using sf version 2.13.19:

  • sf project generate --name testing-392
  • cd testing-392
  • Added community settings to the scratch org definition file
{
  "orgName": "testing",
  "edition": "Developer",
  "description": "testing 392",
  "features": ["EnableSetPasswordInApi", "COMMUNITIES"],
  "settings": {
    "lightningExperienceSettings": {
      "enableS1DesktopEnabled": true
    },
    "mobileSettings": {
      "enableS1EncryptedStoragePref2": false
    },
    "communitiesSettings": {
      "enableNetworksEnabled": true
    }
  }
}

  • sf org create scratch -f config/project-scratch-def.json --set-default -y 1
  • sf community create --name testing-392 --template-name Aloha
  • sf community publish --name testing-392
  • sf org open
  • Go to Setup > Profiles and created a new Profile named FooUser
  • Clicked on Setup > Feature Settings > Digital Experiences > All Sites the clicked Workspaces
  • Clicked Administration
  • Clicked Members
  • Moved over my FooUser profile (and a few others)
  • Clicked Save and waited for email
  • sf project retrieve start
  • Confirmed networkMemberGroups had profiles:
    <networkMemberGroups>
        <profile>Admin</profile>
        <profile>standard</profile>
        <profile>identity user</profile>
        <profile>FooUser</profile>
    </networkMemberGroups>

I did however notice that any subsequent changes to these profiles will not get retrieved. Unfortunately, this is not an issue with the CLI. We use the Source Member table to detect changes in the org, If changes are not "logged" to the Source Member table correctly, we cannot know that they changed.

You can confirm this yourself by querying the Source Member table, run:

  • sf data query -t -q "SELECT MemberType, MemberName, IsNameObsolete, RevisionCounter FROM SourceMember"
  • Look at the revision counter for Network
  • Make a change to the Members > Available Profiles and save
  • sf data query -t -q "SELECT MemberType, MemberName, IsNameObsolete, RevisionCounter FROM SourceMember"
  • Notice the revision counter did not change for Network

The work around is to specifically pull that metadata. For example: sf project retrieve start -m Network

If this workaround is not sufficient, you'll need to open a support case so the team that owns that metadata can ensure they are correctly registering changes with the Source Member table. Hope this helps!

@iowillhoit iowillhoit added owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. and removed owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. labels Oct 19, 2023
@github-actions
Copy link

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:communities bug Issue or pull request that identifies or fixes a bug owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.
Projects
None yet
Development

No branches or pull requests

3 participants