Copied to clipboard

Flag this post as spam?

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


  • Ruth White 5 posts 23 karma points
    Aug 05, 2009 @ 15:03
    Ruth White
    0

    macro parameter name causing parser error

    Does anybody know why using "height" as the name and alias of a macro parameter should cause a parser error? Is it a reserved word?

    Umbraco v4.0.2.1, asp.net v2.0, windows vista, IIS 6.0

    Error message:

    Server Error in '/' Application.

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.Unit' from its string representation '[#col1Box1Height]' for the 'Height' property.

    Source Error:

    Line 7:    <div class="yui-u first">
    Line 8:
    Line 9: <umbraco:Macro height="[#col1Box1Height]" test2="[#col1Box1Header]" test3="[#col1Box1Text]" Alias="ScrollBox" runat="server"></umbraco:Macro>
    Line 10: <div>
    Line 11: <umbraco:Item field="Col1Box2Header" runat="server"></umbraco:Item>


    Source File: /masterPages/About(CorporateChannel)Homepage.master    Line: 9


    Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 05, 2009 @ 15:08
    Sebastiaan Janssen
    0

    Looks like it, the unit is probably supposed to be a percentage or an integer.

  • Peter Duncanson 430 posts 1360 karma points c-trib
    Aug 05, 2009 @ 16:06
    Peter Duncanson
    0

    I would not use height, width or ID as param names in one of my macros, changed the names (imageHeight, imageWidth, imageID) and it worked a treat. I did not get a parse error though, just no output?

  • Ruth White 5 posts 23 karma points
    Aug 05, 2009 @ 16:23
    Ruth White
    0

    Hi

    Yes, I changed the name to boxHeight and the parser error disappeared. The macro still didn't output anything. I had created a test macro whilst trying to find the problem originally. This was working better so I copied my xslt into it and it all works just fine now.

    Stil not sure about the reasons for any of this.

    (I have now just had another problem with a document type disappearing - so maybe something is up with my database?)

    Ruth

Please Sign in or register to post replies

Write your reply to:

Draft