Unknown Page for the Current Site Configuration Error With Coveo Lightning Components

Symptoms

Either when accessing or adding Coveo Lightning components in your community, you get the following error:

Unknown page name for current site configuration
Access the Configuration page installed with the Coveo package

The component fails to render itself apart from the error message, and you are unable to access the Advanced Configuration settings or the Interface Editor.

Cause

This issue happens when you have many Coveo components in your Lightning community that do not share the same Advanced Configuration Settings (see Adding Server-Side Coveo Lightning Component Configuration).

Resolution

To fix this issue, follow these steps:

  1. In your community, note the name of your components. The default names for the out-of-the-box components are communityCoveo and communityCaseCreationCoveo.
  2. Open the Salesforce Developer Console (see Developer Console).
  3. In the Query Editor of the Salesforce Developer Console, perform the following SOQL query:

     SELECT Id, CoveoV2__Configuration__c, CoveoV2__SiteName__c FROM CoveoV2__CoveoLightningSettings__c
    
  4. In the Query Results, double-click on the Coveo__Configuration__c element, which should be a JSON, and copy-paste it in your favorite text editor. The JSON should look similar to this:

     {
         "pages": {
             "communityCaseCreationCoveo": {
                 "userGroups": [],
                 "filter": "",
                 "customTokenGeneration": false,
                 "anonymousUser": null,
                 "additionalUserIdentities": []
             },
             "communityCoveo": {
                 "userGroups": [],
                 "filter": "",
                 "customTokenGeneration": false,
                 "anonymousUser": null,
                 "additionalUserIdentities": []
             }
         }
     }
    
  5. Ensure all the settings of your pages are the same.
  6. Ensure the name of your component is an element of pages. If not, copy-paste one of the elements, and change the page name to your Coveo component.

    Your component name is custom. Your JSON should look like this:

     {
         "pages": {
             "custom": {
                 "userGroups": [],
                 "filter": "",
                 "customTokenGeneration": false,
                 "anonymousUser": null,
                 "additionalUserIdentities": []
             },
             "communityCaseCreationCoveo": {
                 "userGroups": [],
                 "filter": "",
                 "customTokenGeneration": false,
                 "anonymousUser": null,
                 "additionalUserIdentities": []
             },
             "communityCoveo": {
                 "userGroups": [],
                 "filter": "",
                 "customTokenGeneration": false,
                 "anonymousUser": null,
                 "additionalUserIdentities": []
             }
         }
     }
    
  7. Copy-paste the JSON back under Coveo__Configuration__c in the Salesforce Developer Console.

  8. Save the new configuration by selecting Save Rows.

Your component should now work properly.