Copied to clipboard

Flag this post as spam?

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


  • Hendrik Jan 71 posts 137 karma points
    Jul 16, 2010 @ 16:46
    Hendrik Jan
    0

    Contour Library.GetRecord() Error

     

    Hey guys,

    I'm getting an error with the Contour in my xslt file. 

    Umbraco v 4.5
    Contour v 1.0.12

    --------------------------------------------------------------------------------------------------------------------------------------------------------------The xslt:
    <xsl:variable name="record" select="umbraco.contour:GetRecord('62b8ac58-5b68-40d8-83f8-dc55429bd61a')"/>

    The Error:
    System.InvalidCastException: Specified cast is not valid. 
    at Umbraco.Forms.Data.Storage.RecordStorage.GetRecord(Object id) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\RecordStorage\RecordStorage.cs:line 83 
    at Umbraco.Forms.Library.GetRecord(String recordId) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\Library\Library.cs:line 72
    --------------------------------------------------------------------------------------------------------------------------------------------------------------

    So i think the problem is that the 'RecordStorage.GetRecord(Object id)' method only works with a Guid as input. And 'Library.GetRecord(String recordId)' gives it an String.

     

    Can you please fix this? I need this for an project.

     

     

     

  • Sebastiaan Janssen 5018 posts 15341 karma points MVP admin hq
    Jul 17, 2010 @ 10:27
    Sebastiaan Janssen
    0

    Have you tried adding curly braces around the GUID? That sometimes helps..

  • Hendrik Jan 71 posts 137 karma points
    Jul 17, 2010 @ 10:55
    Hendrik Jan
    0

    Thanks for your reply, but its not the xslt that dies here. (I did try the curly braces and it also diddnt work, only made more errors).

    The function RecordStorage.GetRecord(Object id) from contour is at fault here, It only excepts a Guid. It should also work with an String,

Please Sign in or register to post replies

Write your reply to:

Draft