Multisite plugin duplicates the site collection causing wrong information rendered #1623
-
DescriptionThe issue I noticed is related to xm foundation repo https://github.com/sitecorelabs/xmcloud-foundation-head. We can set the pos and host names on the SiteGrouping. In multisite environment, the plugin fetches the information of all the configured sites and created config.js which is then used at the build and run time. In addition to this, we can also configure one website name as jssAppName variable. During the build, the jssAppName is started as the first website and then all the sites collection from XMC is pulled by the multisite plugin. class MultisitePlugin implements SiteResolverPlugin {
exec(sites: SiteInfo[]): SiteInfo[] {
// Add preloaded sites
**sites.push(.**..(JSON.parse(config.sites) as SiteInfo[]));
return sites;
}
} Artem suggested to keep the jssAppName empty which works for some of the scenarios. However, I noticed that doing this will cause issues in other places. For example, the error pages are using this config(404.tsx). Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@isyedakhtar Essentially, this problem happens because of default plugin, did you try to modify that? Default plugin adds default site besides the XMCloud configuration. The default configuration uses *, so this config is less specific. |
Beta Was this translation helpful? Give feedback.
@isyedakhtar Essentially, this problem happens because of default plugin, did you try to modify that? Default plugin adds default site besides the XMCloud configuration. The default configuration uses *, so this config is less specific.