Before You Submit
Related Issue
#2781
Command
sf project retrieve start --target-org
Org Type
Scratch Org
Did this work before?
Not sure
Last Working Version
No response
Summary
Source tracking reports an Experience Cloud NavigationMenu under the SourceMember name Default_Navigation, while Metadata API returns the same component as SFDC_Default_Navigation_Complaint_Public.
Because these names do not match, sf project retrieve start cannot associate the remote SourceMember change with the existing local component.
The component already exists in a configured non-default package directory:
community/main/default/navigationMenus/SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xml
After changing the navigation menu in Experience Builder, sf project retrieve preview reports NavigationMenu:Default_Navigation with no path or projectRelativePath.
On CLI 2.152.14, sf project retrieve start successfully retrieves SFDC_Default_Navigation_Complaint_Public from Metadata API, but writes no files ("files": []) and does not clear the source-tracked change. The same Default_Navigation change therefore appears on every subsequent retrieve preview.
Repository to Reproduce
No response
Steps to reproduce
-
Create or use a source-tracked scratch org containing an Experience Cloud site with a NavigationMenu.
-
Store the NavigationMenu in a configured non-default package directory. For example:
community/main/default/navigationMenus/SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xml
force-app is the default package directory.
-
Reset source tracking:
sf project reset tracking --target-org <scratch-org-alias>
-
Verify both source-tracking previews show no changes:
sf project retrieve preview --target-org <scratch-org-alias> --json
sf project deploy preview --target-org <scratch-org-alias> --json
-
Modify the NavigationMenu in Experience Builder. For example, change the label of one menu item.
-
Run:
sf project retrieve preview --target-org <scratch-org-alias> --json
The CLI reports the changed component as NavigationMenu:Default_Navigation, with no path or projectRelativePath.
-
Run:
sf project retrieve start --target-org <scratch-org-alias> --json
Metadata API successfully returns the component with the fullName SFDC_Default_Navigation_Complaint_Public, but the command returns "files": [].
-
Run retrieve preview again:
sf project retrieve preview --target-org <scratch-org-alias> --json
NavigationMenu:Default_Navigation is still listed in toRetrieve.
-
The naming mismatch can also be confirmed through the Tooling API:
sf data query --use-tooling-api --target-org <scratch-org-alias> --query "SELECT Id, MemberType, MemberName, RevisionCounter, IsNameObsolete FROM SourceMember WHERE MemberType = 'NavigationMenu'"
The SourceMember has MemberName = Default_Navigation, while Metadata API identifies the component as SFDC_Default_Navigation_Complaint_Public.
Expected Result
sf project retrieve start should associate the changed NavigationMenu SourceMember with the existing local NavigationMenu component, retrieve the change into its existing package directory, and update source tracking so the component no longer appears in sf project retrieve preview.
The SourceMember name used for source tracking and the NavigationMenu fullName returned by Metadata API should be reconciled correctly.
Actual Result
Source tracking identifies the changed component as:
NavigationMenu:Default_Navigation
Metadata API identifies and successfully retrieves the component as:
NavigationMenu:SFDC_Default_Navigation_Complaint_Public
The CLI does not associate these identities.
On CLI 2.152.14, the retrieve succeeds at the Metadata API level but returns "files": []. The existing file is not updated and source tracking is not advanced. NavigationMenu:Default_Navigation therefore remains in toRetrieve after the retrieve completes successfully.
On CLI 2.150.6, the behavior was more severe: the retrieve created a duplicate SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xml in the default force-app package directory even though the same component already existed under community.
CLI 2.152.14 no longer reproduces the duplicate-file behavior, but the underlying SourceMember/fullName mismatch and inability to complete the source-tracked retrieve remain.
System Information
{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.152.14",
"nodeVersion": "node-v22.17.1",
"osVersion": "Windows_NT 10.0.26100",
"rootPath": "C:\\Users\\dalden\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli",
"shell": "powershell",
"pluginVersions": [
"@oclif/plugin-autocomplete 4.0.1 (core)",
"@oclif/plugin-commands 5.0.0 (core)",
"@oclif/plugin-help 7.0.0 (core)",
"@oclif/plugin-not-found 4.0.0 (core)",
"@oclif/plugin-plugins 7.0.1 (core)",
"@oclif/plugin-search 2.0.0 (core)",
"@oclif/plugin-update 5.0.0 (core)",
"@oclif/plugin-version 3.0.1 (core)",
"@oclif/plugin-warn-if-update-available 4.0.0 (core)",
"@oclif/plugin-which 4.0.0 (core)",
"@salesforce/cli 2.152.14 (core)",
"agent 2.2.2 (core)",
"apex 4.2.0 (core)",
"api 2.0.10 (core)",
"auth 5.0.7 (core)",
"code-analyzer 5.16.0 (user)",
"community 3.3.57 (user)",
"data 5.1.8 (core)",
"deploy-retrieve 4.2.2 (core)",
"info 4.0.10 (core)",
"limits 4.0.5 (core)",
"marketplace 2.0.6 (core)",
"org 6.0.13 (core)",
"packaging 3.0.7 (core)",
"schema 4.0.7 (core)",
"settings 3.0.7 (core)",
"signups 2.6.66 (user)",
"sobject 2.0.6 (core)",
"source 3.5.21 (user)",
"telemetry 4.1.0 (core)",
"templates 57.3.0 (core)",
"trust 4.0.12 (core)",
"user 5.0.4 (core)"
]
}
Additional Information
Tooling API confirms that this is not merely a local CLI naming artifact. Salesforce reports the SourceMember as:
- MemberType:
NavigationMenu
- MemberName:
Default_Navigation
Metadata API reports the corresponding NavigationMenu as:
- Type:
NavigationMenu
- fullName:
SFDC_Default_Navigation_Complaint_Public
The local source-tracking state likewise records the remote member as NavigationMenu__Default_Navigation.
As a control test, an ApexClass stored in the same non-default community package directory was modified in the scratch org. sf project retrieve preview correctly resolved that component to its existing community/... path. This suggests the issue is specific to NavigationMenu identity resolution rather than general handling of non-default package directories.
Resetting source tracking produces a clean baseline, but the issue immediately returns after the next NavigationMenu modification.
.forceignore patterns targeting both Default_Navigation.navigationMenu and the actual SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xml path did not prevent the SourceMember change from appearing.
There is also historical evidence of Default_Navigation naming behavior in #772, although that issue concerns .forceignore rather than this source-tracking identity mismatch.
Screenshots or Log Files
No response
Before You Submit
sf doctorto diagnose common issuesRelated Issue
#2781
Command
sf project retrieve start --target-org
Org Type
Scratch Org
Did this work before?
Not sure
Last Working Version
No response
Summary
Source tracking reports an Experience Cloud NavigationMenu under the SourceMember name
Default_Navigation, while Metadata API returns the same component asSFDC_Default_Navigation_Complaint_Public.Because these names do not match,
sf project retrieve startcannot associate the remote SourceMember change with the existing local component.The component already exists in a configured non-default package directory:
community/main/default/navigationMenus/SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xmlAfter changing the navigation menu in Experience Builder,
sf project retrieve previewreportsNavigationMenu:Default_Navigationwith nopathorprojectRelativePath.On CLI 2.152.14,
sf project retrieve startsuccessfully retrievesSFDC_Default_Navigation_Complaint_Publicfrom Metadata API, but writes no files ("files": []) and does not clear the source-tracked change. The sameDefault_Navigationchange therefore appears on every subsequent retrieve preview.Repository to Reproduce
No response
Steps to reproduce
Create or use a source-tracked scratch org containing an Experience Cloud site with a NavigationMenu.
Store the NavigationMenu in a configured non-default package directory. For example:
community/main/default/navigationMenus/SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xmlforce-appis the default package directory.Reset source tracking:
sf project reset tracking --target-org <scratch-org-alias>Verify both source-tracking previews show no changes:
sf project retrieve preview --target-org <scratch-org-alias> --jsonsf project deploy preview --target-org <scratch-org-alias> --jsonModify the NavigationMenu in Experience Builder. For example, change the label of one menu item.
Run:
sf project retrieve preview --target-org <scratch-org-alias> --jsonThe CLI reports the changed component as
NavigationMenu:Default_Navigation, with nopathorprojectRelativePath.Run:
sf project retrieve start --target-org <scratch-org-alias> --jsonMetadata API successfully returns the component with the fullName
SFDC_Default_Navigation_Complaint_Public, but the command returns"files": [].Run retrieve preview again:
sf project retrieve preview --target-org <scratch-org-alias> --jsonNavigationMenu:Default_Navigationis still listed intoRetrieve.The naming mismatch can also be confirmed through the Tooling API:
sf data query --use-tooling-api --target-org <scratch-org-alias> --query "SELECT Id, MemberType, MemberName, RevisionCounter, IsNameObsolete FROM SourceMember WHERE MemberType = 'NavigationMenu'"The SourceMember has
MemberName = Default_Navigation, while Metadata API identifies the component asSFDC_Default_Navigation_Complaint_Public.Expected Result
sf project retrieve startshould associate the changed NavigationMenu SourceMember with the existing local NavigationMenu component, retrieve the change into its existing package directory, and update source tracking so the component no longer appears insf project retrieve preview.The SourceMember name used for source tracking and the NavigationMenu fullName returned by Metadata API should be reconciled correctly.
Actual Result
Source tracking identifies the changed component as:
NavigationMenu:Default_NavigationMetadata API identifies and successfully retrieves the component as:
NavigationMenu:SFDC_Default_Navigation_Complaint_PublicThe CLI does not associate these identities.
On CLI 2.152.14, the retrieve succeeds at the Metadata API level but returns
"files": []. The existing file is not updated and source tracking is not advanced.NavigationMenu:Default_Navigationtherefore remains intoRetrieveafter the retrieve completes successfully.On CLI 2.150.6, the behavior was more severe: the retrieve created a duplicate
SFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xmlin the defaultforce-apppackage directory even though the same component already existed undercommunity.CLI 2.152.14 no longer reproduces the duplicate-file behavior, but the underlying SourceMember/fullName mismatch and inability to complete the source-tracked retrieve remain.
System Information
{ "architecture": "win32-x64", "cliVersion": "@salesforce/cli/2.152.14", "nodeVersion": "node-v22.17.1", "osVersion": "Windows_NT 10.0.26100", "rootPath": "C:\\Users\\dalden\\AppData\\Roaming\\npm\\node_modules\\@salesforce\\cli", "shell": "powershell", "pluginVersions": [ "@oclif/plugin-autocomplete 4.0.1 (core)", "@oclif/plugin-commands 5.0.0 (core)", "@oclif/plugin-help 7.0.0 (core)", "@oclif/plugin-not-found 4.0.0 (core)", "@oclif/plugin-plugins 7.0.1 (core)", "@oclif/plugin-search 2.0.0 (core)", "@oclif/plugin-update 5.0.0 (core)", "@oclif/plugin-version 3.0.1 (core)", "@oclif/plugin-warn-if-update-available 4.0.0 (core)", "@oclif/plugin-which 4.0.0 (core)", "@salesforce/cli 2.152.14 (core)", "agent 2.2.2 (core)", "apex 4.2.0 (core)", "api 2.0.10 (core)", "auth 5.0.7 (core)", "code-analyzer 5.16.0 (user)", "community 3.3.57 (user)", "data 5.1.8 (core)", "deploy-retrieve 4.2.2 (core)", "info 4.0.10 (core)", "limits 4.0.5 (core)", "marketplace 2.0.6 (core)", "org 6.0.13 (core)", "packaging 3.0.7 (core)", "schema 4.0.7 (core)", "settings 3.0.7 (core)", "signups 2.6.66 (user)", "sobject 2.0.6 (core)", "source 3.5.21 (user)", "telemetry 4.1.0 (core)", "templates 57.3.0 (core)", "trust 4.0.12 (core)", "user 5.0.4 (core)" ] }Additional Information
Tooling API confirms that this is not merely a local CLI naming artifact. Salesforce reports the SourceMember as:
NavigationMenuDefault_NavigationMetadata API reports the corresponding NavigationMenu as:
NavigationMenuSFDC_Default_Navigation_Complaint_PublicThe local source-tracking state likewise records the remote member as
NavigationMenu__Default_Navigation.As a control test, an ApexClass stored in the same non-default
communitypackage directory was modified in the scratch org.sf project retrieve previewcorrectly resolved that component to its existingcommunity/...path. This suggests the issue is specific to NavigationMenu identity resolution rather than general handling of non-default package directories.Resetting source tracking produces a clean baseline, but the issue immediately returns after the next NavigationMenu modification.
.forceignorepatterns targeting bothDefault_Navigation.navigationMenuand the actualSFDC_Default_Navigation_Complaint_Public.navigationMenu-meta.xmlpath did not prevent the SourceMember change from appearing.There is also historical evidence of
Default_Navigationnaming behavior in #772, although that issue concerns.forceignorerather than this source-tracking identity mismatch.Screenshots or Log Files
No response