Copied to clipboard

Flag this post as spam?

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


  • Arne 15 posts 36 karma points
    Sep 27, 2012 @ 14:10
    Arne
    0

    uComponents datatypes store UniqueID's instead of ID's

    Hi all,

    I'm using the uComponents like the XPath CheckBoxList, XPath DropDownList and MNTP for storing node ID's in xml format. This all turned out to work well, untill I discovered some strange behavior.

    For some nodes (seems random), the uniqueID value is stored (from the umbracoNode-table) instead of the ID value of the node. Very strange, because I set up the picker as follows (example for CheckBoxList):

    • Database Type: ntext
    • XPath Expression: Doesn't matter I think, because the problems occurs on different datatypes
    • Storage Type: Xml
    • Values: Node Ids

    My DDL datatypes have the same settings, except for the Database Type and Storage Type fields, 'cause these are not available for the XPDDL. My MNTP doesn't even use XPath, but is a content-picker control.

    Any ideas? It doesn't have anything to do with published / non-published nodes, I already figured that out.

    Thanks!

    Arne

  • Arne 15 posts 36 karma points
    Sep 27, 2012 @ 14:15
    Arne
    0

    Due to a bug in the forums, here's an updated startingpost:

    -------------------------------------------------------

    Hi all,

    I'm using uComponents datatypes like the XPath CheckBoxList, XPath DropDownList and MNTP for storing node ID's in xml format. This all turned out to work well, untill I discovered some strange behavior.

    For some nodes (seems random), the uniqueID value is stored (from the umbracoNode-table) instead of the ID value of the node. Let's say it happened to <1% of all my uComponents datatypes / nodes. For example, I've set up the XPath datatypes as follows (example for CheckBoxList):

    • Database Type: ntext
    • XPath Expression: Doesn't matter I think, because the problems occurs on different datatypes
    • Storage Type: Xml
    • Values: Node Ids

    My DDL datatypes have the same settings, except for the Database Type and Storage Type fields, 'cause these are not available for the XPDDL. My MNTP doesn't even use XPath, but is a content-picker control.

    Any ideas? It doesn't have anything to do with published / non-published nodes, I already figured that out.

    Thanks!

    Arne

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 27, 2012 @ 15:41
    Jeroen Breuer
    0

    Have you already tried how your data looks in the database?

    You can get the database values with this query:

    select cpd.dataNText, cpd.dataNvarchar, cpd.dataDate, cpd.dataInt from cmsDocument cd
        inner join cmsPropertyData cpd ON cd.nodeId = cpd.contentNodeId
        inner join cmsPropertyType cpt ON cpd.propertytypeid = cpt.id
    where cd.newest = 1
    and cd.versionId = cpd.versionId
    and cpd.contentNodeId = 1333
    and cpt.Alias = 'pageText'

    If you replace the cpd.contentNodeId with the id of the node where the problem occurs and the cpt.Alias with the alias of the property in which it's stored than you can see how the values are in the database. At least than you know if the data is stored wrong or if it goes wrong when the data is fetched from the xml cache.

    Jeroen

  • Arne 15 posts 36 karma points
    Sep 27, 2012 @ 16:06
    Arne
    0

    Values are stored the wrong way (GUID's):

    NULL
    NULL
    8447b965-8404-428b-acd1-dbada155f8a9
    NULL

    Order: dataInt, dataDate, dataNvarchar, dataNtext.

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Sep 27, 2012 @ 16:10
    Jeroen Breuer
    0

    Hmm I don't think I've seen this before. Does it also happen after saving the node again? If that's the case it might be best to download the source of uComponents and try to debug it. 

    Jeroen

  • Arne 15 posts 36 karma points
    Sep 27, 2012 @ 16:25
    Arne
    0

    Doesn't happen again, that's the problem ;-). Otherwise, debugging would be an option. Already looked at the sourcecode, but that doesn't help me further... Don't see anything that uses 'uniqueID'.

    Arne

  • Arne 15 posts 36 karma points
    Sep 27, 2012 @ 16:38
    Arne
    0

    Maybe this makes sense... A while ago, I changed the 'Mandatory' field to true for the DDL-field, to make sure users fill in these fields. Although I don't know for sure if I did that for the MNTP-field as well...

    Did this change force Umbraco / uComponents to fill in the property into some kind of default value (= uniqueID)? Just brainstorming...

  • Mayfly Media 12 posts 177 karma points
    Sep 18, 2013 @ 16:11
    Mayfly Media
    0
Please Sign in or register to post replies

Write your reply to:

Draft