1

I have a multi-site instance having site1, site2, site3,... and the instance name is Mysite. Each site has its own SiteDefinition.config

When I try to open a site2 or site3 page in the experience editor, it opens the site1's home page.

On checking the Mysite/sitecore/admin/showconfig.aspx page, the site definition nodes are in this order - Site1, Site2, Site3. So, I modified site1 definition config to load after site2.

But now, when I browse site2 page in experience editor either by instance name (mysite/site2/home/somepage) or domain name (site2.com/somepage), it always loads the site2 home page.

Is there any setting for a multi-site instance to be able to see any site's page in experience editor irrespective of the site definition order.

using Sitecore 8.2

  • How are you trying to open the Experience editor? I think you are opening it via Sitecore Launchpag -> Experience Editor. Right? You can navigate to the item in the content editor and then open in Experience editor. – Sumit Upadhyay Nov 6 at 9:34
  • @SumitUpadhyay. I'm opening the item in the CE. – Qwerty Nov 8 at 3:14
2

There is a setting Preview.ResolveSite in Sitecore.config.

If true, when a user previews an item, Sitecore tries to resolve the root item and the context site based on the current content language and the path to the item. If Sitecore cannot resolve the context site, it uses the site that is specified in the Preview.DefaultSite setting. Default value: true

<setting name="Preview.ResolveSite" value="true" />

In multi-site solutions, when opening an item in Experience Editor, it is important that sc_site query string parameter in the URL is set properly. The aforementioned setting helps with that. When the setting is set to true, it will resolve the context site based on the path to the item and the current content language. Then, the context site name will be appended to the &sc_site query string parameter properly.

http://yourhostname.com/?sc_mode=edit&sc_itemid=%7b3FC5EF65-8170-4EBB-BFBC-AD0CD0852521%7d&sc_version=1&sc_lang=en&sc_site=current-context-site

Please also refer to this similar answer.

Update: In addition to this, you can check that these 3 settings are also set to true, the details are described in this Sitecore Knowledge Base article:

There are several settings that help to configure proper site resolving logic in multisite Sitecore solutions:

  • Rendering.SiteResolving — enables site resolving, so cross-site links can be rendered with correct hostname, language, and virtual folder.

  • Rendering.SiteResolvingMatchCurrentSite — item location is taken into consideration when a cross-site link is built. All items under a certain site root will be resolved in the context of that root.

  • Rendering.SiteResolvingMatchCurrentLanguage — when true, context language is taken into consideration when a cross-site link is built.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.