[closed] UUID type with ftRenderType="list" fails

Not sure if this it’s just me, but I’ve had a few custom types with a UUID property using ftRenderType=“list”. When saving it added a comma at the end of the UUID causing the webtop list to fail with a object passed to getData not of type UUID.

<cfproperty name="region" type="uuid" required="false" ftSeq="16"  ftLabel="Region" ftType="uuid" ftRenderType="list" ftJoin="wbRegion">

8814660A-FABF-3304-2D83000B195CBF01,

Removing the ftRenderType resolved the issue when using the library picker.

I think I remember seeing this bug a while back and that it was fixed. What version of FarCry are you on?

I’m using 7.02. The last time I came across this was with 6.2.10 so its been around a while.

Just did a test on 7.0.5 and it’s still returning ‘,’ as the value for an unselected select field.

A quick mod of the UUID.cfc formtool would fix this. (Around line 62) Move the check for if stFieldPost.value EQ “,” to outside of the if listLen(stFieldPost.value)
Because the list length of a string with just a comma in it returns 0.

It would be so awesome if you could actually post code into discourse.

Discourse is really good at code – you just have to use

three back ticks to fence the code block like this

and all should be well.

We just merged in a pull request from @jorgenskogas that should fix this issue :smile:

That’s available now in the p700 maintenance branch, and will be in the next tagged build.

Enjoy!

I’m seeing this in 6.3.2. Did the fix get backported to p630?

Ahh, I thought it was only a bug in 7.x and that earlier versions were already fixed somehow… In that case it’d have to be cherry picked into the older maintenance branches. Does this affect both p620 and p630?

I came across this bug today too (p630). Took me a few hours trying to track it down. Having these all over the place effecting lots of records = (

Can anyone easily confirm if p620 is also affected? I don’t have time to fully investigate myself right now, but I can do the cherry picks if that’s all we need (or accept a pull request) :slight_smile:

Unfortunately I don’t have any clients or example sites still using p620 to test with.

Ok, I’ve cherry picked into p630 and resolved 2 conflicts. Please let me know if that has fixed it.

It did not fix my problem =. Maybe my problem is coming from something else.

I’m using the FarCry Solr Pro plugin and the field giving the issue is the following:

<cfproperty ftSeq="120" ftFieldset="Solr Content Type" ftLabel="Content Type" name="contentType" ftType="list" type="nstring" ftListData="getContentTypes" ftRenderType="dropdown" required="true" ftValidation="required" ftHint="The content type being indexed." />

I’m curious, the fixes that you pushed up… do they look at anything coming from ftType=“list”?

To replicate the error, just edit a solrpro type and click save.

I don’t think so, this thread was about the UUID formtool and the pull request from Jorgen patched uuid.cfc, so maybe your issue is a little different?

Okay. I’ll have to see what I can find and discover why FarCry is adding a comma to the end of the list. At the moment I don’t have time to investigate so I’m just doing a beforeSave() and manually stripping the comma out.

In the formtool list.cfc in the validate method I added:
stResult.value = arrayToList(listToArray(stResult.value, “,”), “,”)