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.
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.
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.
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.
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'.
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...
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):
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
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):
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
Have you already tried how your data looks in the database?
You can get the database values with this query:
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
Values are stored the wrong way (GUID's):
NULL
NULL
8447b965-8404-428b-acd1-dbada155f8a9
NULL
Order: dataInt, dataDate, dataNvarchar, dataNtext.
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
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
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...
is working on a reply...