Failing to Load Site Settings due to unsupported locale


The Site Settings can fail to load if the environment if the site is in a localized environment. The specific portal may not support the locale that is selected for the environment.





The error generated in the SiteRoot/Portals/_default/Logs folder while navigating to the Settings > Site Settings is:

Failed to load resource: the server responded with a status of 400 (Bad Request)
API/PersonaBar/SiteSettings/GetPortalSettings?portalId=undefined&cultureCode=:1 Failed to load resource: the server responded with a status of 400 (Bad Request)

Accessing the network request that was failing and viewing the response in the developer tools by pressing F12 and clicking the network tab, shows:

{"Message": "Current site does not support this locale (en-US)."}

This error is due to the Portal not having the specific Locale/Language. In this case, it appears that the PortalLocalization table has the correct culture code (en-US). However, the PortalLanguages table does not have the respective pair for the Portal ID / Locale.



To resolve this error, follow the steps below:

  1. Locate the Portal ID of one of the sites with this issue. You can find this PortalID by going into Manage > Sites > List View > Site ID.


  2. Then execute the following queries from the Settings > SQL Console menu in the Persona Bar or using SSMS.

    The query below will list the CultureCode used for the Portal and the Language ID for this CultureCode. Since the error mentions 'en-US', the LanguageID is expected to be '1'. You can confirm the LanguageID by running SELECT * FROM Languages in the SQL Console.

    SELECT PortalID,
    FROM PortalLocalization pl
    JOIN Languages l ON pl.CultureCode = l.CultureCode
    WHERE PortalID = X --replace the X with the Portal ID
  3. Once the language(s) used by the Portal have been identified, next, we will execute the query below to find out if the language(s) are bound to the Portal.
    SELECT PortalID,
    FROM PortalLanguages
    WHERE PortalID = X --replace the X with the Portal ID
  4. If the above query does not return an entry matching the PortalID/LanguageID for the Portal with this issue, then the solution would be to insert the missing language manually. We can add the language to the Portal using the below query.

    As a best practice, make sure to create a backup of the database before proceeding.
    Note: In the query below, make sure to replace PortalID and LanguageID with the corresponding values.
    EXEC AddPortalLanguage PortalID, LanguageID, 1, 1
  5. The last step is to clear the Application Cache to load the new settings from the database. To clear the cache, go to the Settings > Servers menu and click on the Clear Cache button.



You can test that this issue has been resolved by:

  1. Go into Settings > Site Settings
  2. The Site Settings should now load without any issues.



Please sign in to leave a comment.