Issue
System Log displays error: "CMS site data missing from table"
Problem
The System Log is displaying a reoccurring error similar to:
CMS site data missing from table: [sc_catalog_site] sc_catalog: [e0d08b13c3330100c8b837659bba8fb4] content_site: [faea7ad449922000caa52338b90d7897]: no thrown error
Symptoms
The following error is seen when the System Administrator naviagates to System Logs > System Log > Errors:
Cause
This error message is hard-coded, non-editable, and generated from this snippet with the CatalogSite.java code:
// If we get here the object hasn't been cached yet.
GlideRecord catSiteGr = new GlideRecord(SC_CATALOG_SITE);
catSiteGr.addQuery(SC_CATALOG, fCatalogId);
catSiteGr.addQuery(CONTENT_SITE, fSiteId);
catSiteGr.query();
/*
* If Customer CMS site hasn't been set up just return a blank string
* This may cause some slow down until they set up their CMS site
* correctly. We could cache the blank values but would we want to speed
* up incorrect config?
*/
if (!catSiteGr.next()) {
Log.error(String.format("CMS site data missing from table: [%s] sc_catalog: [%s] content_site: [%s]",
new Object[]{SC_CATALOG_SITE, fCatalogId, fSiteId}));
return;
}
The above code cheeks if a CMS Site [content_site] has a corresponding Catalog [sc_catalog]. Starting with Eureka, support for multi-catalogs was introduced. For more information, see Managing Catalog Sites.
If you want to use a Catalog [sc_catalog] within a CMS Site [content_site], a Catalog Site [sc_catalog_site] record must be defined linking the two. The example screenshots shows want is configured in the base system:
To resolve the error, associate Catalog(s) to the CMS Site with the following steps:
- Navigate to Content Management > Sites.
- Filter on the sys_id of the Site [content_site] referenced in the error.
- Configure related lists to add the Catalog related list (it is not displayed in the base system by default).
- On the related list, click Edit to specify the missing Catalog(s).
The following is a example of the base system CMS Site's Catalog association: