Copied to clipboard

Flag this post as spam?

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


  • Rich 22 posts 41 karma points
    Mar 06, 2012 @ 13:38
    Rich
    0

    umbraco.MacroEngines.PropertyResult in PropertyTranslation.cshtml

    I believe I've encountered a bug with the PropertyTranslation.cshtml macro file.

    I'm using the approach of having different tabs for my different languages and a "_{languageId}" suffix to my translation properties.

    When I use the PropertyTranslation macro I get 'umbraco.MacroEngines.PropertyResult' rendered.... it seems that

    page.GetProperty(Parameter.Property).ToString()

    is being used when it should be

    page.GetProperty(Parameter.Property).Value.ToString()

    This seems to solve things for me... there's more than one use like this in the macro. I've not fully tested it but thought I would bring it up on here first so that I could be told "no -- it's meant to do this, you're doing it wrong" before I spent any more time on it.

     

  • dimi309 245 posts 579 karma points
    Mar 06, 2012 @ 13:48
    dimi309
    0

    Hello Rich,

    Are you using Umbraco 4.7.1? In that case you would need to apply the Razor script patch as mentioned in the instructions. You can download it from Codeplex. The reason that this is a patch and not included in the default package is that the with the Razor engine for Umbraco 4.7.0 the first command which you mention retrieves the property, whereas from 4.7.1 the second is used or another method, which is GetPropertyValue (the latter is the one I use in the patch).

    Please let me know if this resolves the issue.

    Best regards,

    Dimitri

  • Rich 22 posts 41 karma points
    Mar 06, 2012 @ 14:03
    Rich
    0

    Ah, my appologies and thanks Dimitri... I downloaded the documentation and worked from that. There's no mention of the patch in the pdf from what I can see, may be worth adding it in?

    Although, now you mention it, the bold text is pretty obvious. I shall get the patch installed after some lunch and hush my mouth ;)

  • dimi309 245 posts 579 karma points
    Mar 06, 2012 @ 16:08
    dimi309
    0

    I'm glad it worked! You have a point about the documentation pdf. I'll mention the patch there too, as soon as possible.

    Thanks for the tip!

    Dimitri

Please Sign in or register to post replies

Write your reply to:

Draft