If you reverse the order then the page editor will throw an error complaining that Sitecore.UiUtil.GetHomeItem() cannot find the object when logging into sitecore from your domain. Eg. www.test.com/sitecore/login will not work properly but localhost/sitecore/login works.
Turns out the handler checks the entries starting at the top and stops at the first match.
This order works:
<site name="login" virtualfolder="/sitecore/login">
<site name="testing" virtualfolder="/sitecore/testing">
<site name="admin" virtualfolder="/sitecore/admin">
<site name="service" virtualfolder="/sitecore/service">
<site name="modules_shell" virtualfolder="/sitecore modules/shell">
<site name="modules_website" virtualfolder="/sitecore modules/web">
<site name="site1" hostname="sitecore.site1.com" virtualfolder="/">
<site name="site2" hostname="sitecore.site2.com" virtualfolder="/">
This order fails:
<site name="site1" hostname="sitecore.site1.com" virtualfolder="/" br=""><site name="mica" hostname="sitecore.site2.com" virtualfolder="/" br=""><site name="shell" virtualfolder="/sitecore/shell" br=""><site name="login" virtualfolder="/sitecore/login" br=""><site name="admin" virtualfolder="/sitecore/admin" br=""><site name="service" virtualfolder="/sitecore/service" br=""><site name="modules_shell" virtualfolder="/sitecore modules/shell" br=""><site name="modules_website" virtualfolder="/sitecore modules/web" br="">
<site name="site1" hostname="sitecore.site1.com" virtualfolder="/" br=""><site name="mica" hostname="sitecore.site2.com" virtualfolder="/" br=""><site name="shell" virtualfolder="/sitecore/shell" br=""><site name="login" virtualfolder="/sitecore/login" br="">
Hey Susan, thanks for this post. It was driving me crazy!.
ReplyDeleteThank you for this. Mine surfaced as a TargetInvocationException on WebEditRibbon, which was very misleading, but was the same error as described.
ReplyDelete