Skip to main content

Resolving validation errors - "We couldn't validate <property_name> in <file_path.json> for component <component_id>. Error:<specific_error_information>" on Experienced Bundle metadata type

Cause and solution to this Salesforce validation error surfacing Experience Bundle metadata

Mateusz Kochanowicz avatar
Written by Mateusz Kochanowicz
Updated over 2 months ago

Error overview

You may run into this Salesforce validation error when deploying Experience Bundle metadata. The error may be related to a Navigation Menu, or an entirely different component.

An example of an error message referencing a Navigation Menu may look as below:

We couldn't validate componentAttributes in Applicant<xxx>.json for component <component_id>. Error: attribute [navigationMenuEditorRefresh]: The navigation menu Default_Navigation1 doesn't exist.. Check your file and try again.

In this particular use case, Salesforce is detecting the Navigation Menu called Default_Navigation1 in the source doesn't match the configuration in the target org.

We can confirm it by inspecting the Experience Bundle .json component referenced in the error message.

In this example the component's name is: Applicant_Experience_Cloud1/themes/educationApplicantPortal.json.

Gearset comparisons results help you surfaces the differences in XML between the source and target environments (orgs) that you're comparing.

The results are likely to show that the configurations in the source and target org aren't matching, which is the reason why validation fails (e.g. Default_Navigation1 in the source, and Default_Navigation1 in the target).

Explanation of the error

Salesforce explains in their documentation what the cause for these type of validation errors is:

"In ExperienceBundle, this error occurs when the site configuration in the source org doesn't match the target org. For example, let's say the theme in the source org is using Default_User_Profile_Menu, but the theme in the target org is using Default_User_Profile_Menu1."

Resolution

Salesforce proposes the solution below as a workaround:

"Ensure that the sites in the source and target orgs use the same configuration. For example, if the specific error information mentions that a component is missing, ensure that the component names match in both orgs."

If you're comparing a Git branch with a Salesforce org, the quickest solution would be to make a direct change on the source branch. And then re-run your validation.

Or to commit a change to your source branch, and then re-run a validation against the org.

Workaround for PR validation in Gearset Pipelines

In Gearset Pipelines, you'd want to make a change directly in the feature branch and then re-run your PR validation in the Pipeline.

Workaround for org to org validations

If you're running an org to org validation in Gearset using our Compare and deploy tool, follow these steps:

  • Consider downloading your deployment package from Gearset. For guidelines on how to, follow the steps from this article: How can I change the deployment package before deploying?

  • Once you've downloaded the package, amend the XML of the <xxx>.json component referenced in the error message. Make sure the XML matches the configuration of the target org.

  • Once done, save the package in a .zip file, navigate to Gearset's Compare and deploy page, and use Local files option as the source of your new comparison.

    • This option allows you to upload your amended .zip package, and use it as the source of your comparison/deployment.

Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?