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:
@@ -87,7 +87,7 @@ namespace Umbraco.Core
|
||||
/// <returns></returns>
|
||||
public static DisposableTimer DebugDuration(Type loggerType, string startMessage, string completeMessage)
|
||||
{
|
||||
LogHelper.Info(loggerType, () => startMessage);
|
||||
LogHelper.Debug(loggerType, () => startMessage);
|
||||
return new DisposableTimer(x => LogHelper.Debug(loggerType, () => completeMessage + " (took " + x + "ms)"));
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Umbraco.Core.ObjectResolution
|
||||
/// TODO: However, it would make much more sense to do this and would speed up the application plus this would make the GetById method much easier.
|
||||
/// </remarks>
|
||||
protected LegacyTransientObjectsResolver(IEnumerable<Type> refreshers)
|
||||
: base(ObjectLifetimeScope.Transient) // false = new objects every time
|
||||
: base(ObjectLifetimeScope.Transient) // new objects every time
|
||||
{
|
||||
foreach (var l in refreshers)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user