I have a weird problem. Sometimes It seems the alias I am looking for could not be found. It is always the same alias for a particular header that I am loading from umbraco. I suppose it sometimes is not included in the XSLT content tree. It happens VERY rarely though and I actually never experienced the problem my self - I have only gotten error mails indicating the problem when users experience it.
I know this description of the problem here is pretty hazy but I don't really know how to explain it. Does anyone have an idea what might be the problem? Otherwise please ask and I will try to elaborate.
I only have the .NET error from the error mails I am getting. It looks like this:
Exception:
Inner exception
Message: alias not found. ChooseSection_BoxTitle
Source: App_Code
TargetSite: System.String GetFieldValue(umbraco.presentation.nodeFactory.Node, System.String)
StackTrace: at UmbracoHelper.GetFieldValue(Node node, String alias)
at usercontrols_BuyNewCards.LoadCmsLiterals()
at usercontrols_BuyNewCards.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
TargetSite: Boolean HandleError(System.Exception)
StackTrace: at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The error "alias not found" is a custom error and is generated by this code:
public static string GetFieldValue(Node node, string alias) { foreach (Property p in node.Properties) { if (p.Alias == alias) return p.Value; }
throw new ApplicationException("alias not found. " + alias); }
The Node object is an umbraco node and apparently sometimes does NOT contain the property that is asked for...
It only happens very rarely and, as I said, I never experienced it myself.
Sometimes an alias cannot be found
Hi
I have a weird problem. Sometimes It seems the alias I am looking for could not be found. It is always the same alias for a particular header that I am loading from umbraco. I suppose it sometimes is not included in the XSLT content tree. It happens VERY rarely though and I actually never experienced the problem my self - I have only gotten error mails indicating the problem when users experience it.
I know this description of the problem here is pretty hazy but I don't really know how to explain it. Does anyone have an idea what might be the problem? Otherwise please ask and I will try to elaborate.
By the way I am using umbraco 3.0.5 ...
Hi Morten,
Can you post the ASP.NET error?
What 'alias' do you mean? This could apply to data, macro, doctype, template, etc.
did you take into account an alias is case sensitive?
Thank you for the replys.
I only have the .NET error from the error mails I am getting. It looks like this:
Exception:
Inner exception
Message: alias not found. ChooseSection_BoxTitle
Source: App_Code
TargetSite: System.String GetFieldValue(umbraco.presentation.nodeFactory.Node, System.String)
StackTrace: at UmbracoHelper.GetFieldValue(Node node, String alias)
at usercontrols_BuyNewCards.LoadCmsLiterals()
at usercontrols_BuyNewCards.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
TargetSite: Boolean HandleError(System.Exception)
StackTrace: at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The error "alias not found" is a custom error and is generated by this code:
public static string GetFieldValue(Node node, string alias)
{
foreach (Property p in node.Properties)
{
if (p.Alias == alias)
return p.Value;
}
throw new ApplicationException("alias not found. " + alias);
}
The Node object is an umbraco node and apparently sometimes does NOT contain the property that is asked for...
It only happens very rarely and, as I said, I never experienced it myself.
Can anyone of you make sense of the above?
is working on a reply...