You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: