0

I recently attempted to deploy a change in my Experience using ExperienceBundles. The only files that were changing were:

  • MySite/themes/customerService.json - change in CSS
  • MySite/config/helpCenter.json - added a CSP

But I got this error in the deployment:

The topicId property of component 9b8a4e98-xxxx-xxxx-xxxx-xxxxxxxx references an object with the ID value 0TOxxxxxxxxxxx

The SFDC Experience Cloud Developer Guide page Deploy Your Experience Cloud Site with the Metadata API describes this error with the following:

When deploying a site, you sometimes receive a warning message about invalid ID values. For example: The topicId property of component 9b8a4e98-e724-4292-bd3c-0813adf9ddc2 references an object with the ID value 0TO4R000000EGPEWA4. Occasionally, when deployed to a destination org, ID values can become invalid—for example, if the referenced ID doesn’t exist in the destination org. If you encounter component issues in your destination org, verify that the ID values are correct.

Neither of my two deployed Experience Bundle components mention topicId so why is this error occurring and what exactly is the Experience Developer Guide document telling me how to fix it?

1 Answer 1

1

This was not obvious at first.

Steps to Solution

  1. Hopefully, your metadata for your Experience Site is in your VCS and is up-to-date. If not, create a project (or use Workbench) and download the ExperienceBundle for the site in question into a text searchable form.

  2. Search the metadata for the component Id referenced in the error message. In my situation, this turned out to be in the file:

    MySite/views/home.json  <= the Home page of a Customer Service template experience
    
  3. Looking at the metadata, I could see a Home page component of:

    {
     "components" : [ {
       "componentAttributes" : {
         "numberOfArticles" : 5,
         "title" : "Trending Articles",
         "topicId" : "0TO1Q000000suwCWAQ"  <= the offending topicId
       },
       "componentName" : "selfService:topicTrendingArticles42",
       "id" : "6fed8c75-5d89-4555-8372-9d4b59f94067",
       "renderPriority" : "NEUTRAL",
       "renditionMap" : { },
       "type" : "component"
     } ],
     "id" : "7898cdc6-b41c-4773-aa4e-8c9afc00c281",
     "regionName" : "featured",
     "type" : "region"
     }
    
  4. Doing a query on Topic SELECT Id, Name FROM Topic WHERE Id = '0TO1Q000000suwCWAQ' returned 0 rows

  5. Conclusion - the Topic had been deleted from the PROD org directly in the org rather than via deploying via normal change control procedures. Looking back through JIRA tickets confirmed this.

TIL: Deleting the topic (observed V58) from the org using the Content Management UX portion of Experience Cloud Workspace tools does not delete references to that topic in one or more of these Experience components.

enter image description here

Furthermore, even if you are deploying unrelated ExperienceBundle files, SFDC is still checking the other files in your Site for internal consistency

RESOLUTION

Deploy the Experience Bundle for the file containing the error message-indicated affected component and be sure that if there is a referenced topicId attribute in the source file, that it is either "" or a valid Topic Id that exists in the target org (the latter might require coercion in your VCS branch prior to deployment

In my case, I simply deployed file MySite/views/home.json

{
 "components" : [ {
   "componentAttributes" : {
     "numberOfArticles" : 5,
     "title" : "Trending Articles",
     "topicId" : ""  <= set to none and let system rebuild via user activity
   },
   ...
 } ],
 "id" : "7898cdc6-b41c-4773-aa4e-8c9afc00c281",
 "regionName" : "featured",
 "type" : "region"
 }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .