Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Morten Olsen 3 posts 23 karma points
    Sep 07, 2009 @ 13:28
    Morten Olsen
    0

    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.

  • Morten Olsen 3 posts 23 karma points
    Sep 07, 2009 @ 13:29
    Morten Olsen
    0

    By the way I am using umbraco 3.0.5 ...

  • Chris Koiak 700 posts 2626 karma points
    Sep 07, 2009 @ 13:44
    Chris Koiak
    0

    Hi Morten,

    Can you post the ASP.NET error?

    What 'alias' do you mean? This could apply to data, macro, doctype, template, etc.

  • Roel Snetselaar 151 posts 305 karma points
    Sep 07, 2009 @ 15:00
    Roel Snetselaar
    0

    did you take into account an alias is case sensitive?

  • Morten Olsen 3 posts 23 karma points
    Sep 09, 2009 @ 12:21
    Morten Olsen
    0

    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?

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies