When the BaseUrl site setting is empty a null exception is thrown in the AdvancedSitemapService.cs (Master) or HomeController.cs (Orchard-1.3x Tag v1.6.0).
private string GetRootPath()
{
var baseUrl = _siteService.GetSiteSettings().BaseUrl;
if (!baseUrl.EndsWith("/"))
baseUrl += "/";
return baseUrl;
}
baseUrl should be checked for null or empty. if empty, then use ApplicationRootUrl (Orchard.Utility.Extensions)
private string GetRootPath() {
var baseUrl = _siteService.GetSiteSettings().BaseUrl;
// If Base Url is not set, use the Request Application Root Url
if (string.IsNullOrEmpty(baseUrl))
{
baseUrl = HttpContext.Request.ToApplicationRootUrlString();
}
if (!baseUrl.EndsWith("/"))
baseUrl += "/";
return baseUrl;
}
I am using the Module from the Orchard Gallery, which looks like it is on branch Orchard-1.3x tag v1.6.0
When the BaseUrl site setting is empty a null exception is thrown in the AdvancedSitemapService.cs (Master) or HomeController.cs (Orchard-1.3x Tag v1.6.0).
baseUrl should be checked for null or empty. if empty, then use ApplicationRootUrl (Orchard.Utility.Extensions)
I am using the Module from the Orchard Gallery, which looks like it is on branch Orchard-1.3x tag v1.6.0