Fixes HasContent if there is actually no content (new install).
Fixes issue with TreeDefinitionCollection not initializing when accessing singleton... not sure how i overlooked that before. This fixes issues with MNTP initialization and probably some other tree stuff. Removes warning log in umbracomodule for not a document as this just takes up space in the log. Fixes issue with logger that was logging 'Info' for our internal Debug calls.
This commit is contained in:
@@ -161,7 +161,10 @@ namespace Umbraco.Web
|
||||
|
||||
public bool HasContent(UmbracoContext umbracoContext)
|
||||
{
|
||||
var node = GetXml(umbracoContext).SelectSingleNode(XPathStrings.RootDocuments);
|
||||
var xml = GetXml(umbracoContext);
|
||||
if (xml == null)
|
||||
return false;
|
||||
var node = xml.SelectSingleNode(XPathStrings.RootDocuments);
|
||||
return node != null;
|
||||
}
|
||||
|
||||
|
||||
@@ -271,10 +271,11 @@ namespace Umbraco.Web
|
||||
if (maybeDoc && GlobalSettings.IsReservedPathOrUrl(lpath))
|
||||
maybeDoc = false;
|
||||
|
||||
if (!maybeDoc)
|
||||
{
|
||||
LogHelper.Warn<UmbracoModule>("Not a document");
|
||||
}
|
||||
//NOTE: No need to warn, plus if we do we should log the document, as this message doesn't really tell us anything :)
|
||||
//if (!maybeDoc)
|
||||
//{
|
||||
// LogHelper.Warn<UmbracoModule>("Not a document");
|
||||
//}
|
||||
|
||||
return maybeDoc;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace umbraco.cms.presentation.Trees
|
||||
{
|
||||
get
|
||||
{
|
||||
instance.EnsureTreesRegistered();
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user