Closed hfloyd closed 3 years ago
I pulled the source code to see if I could make the changes needed for this to work. I see that there are a few things which need to be considered in order to make this update:
Codery.DataTypePicker
) - so in order to return a GUID that would also need to be updated.TextCountConfiguration.DataType
property from an int to a Guid would cause an issue on upgrade for any existing DataTypes utilizing the package. This leads me to believe that a new version would need to be considered "breaking".Making the changes would qualify the package as "Umbraco Deploy compatible", but I can understand if this isn't something you'd want to undertake. What are your thoughts?
Yes, it does look like a new version would then be breaking, but I might see if there is a way to detect any existing stored values and convert them from an int to Guid to help existing data types when an automatic NuGet upgrade is done.
Either way, I think it's still a good idea to move to Guids, since that really is the recommended way now to reference data types.
I was looking at your Codery.DataTypePicker
package to see if I could help with making a GUID version of the picker... It appears that the Umbraco-provided Angular resource dataTypeResource
doesn't provide a GUID, so a custom API/AJAX resource might be needed here.
Would you like me to work on that?
I had a quick look this morning and as far as I could see the dataTypeResource
does return GUIDs as well (in the key
property of each data type), and I already have some working code locally to change that over (while handling existing int values).
I'll try to have a look this weekend to see if I can make the changes for the TextCount package as well.
I've now released a new version (v2.1.0) of both the DataTypePicker and TextCount packages that will store the chosen data type's GUID instead of the integer ID. It will still work with the old stored int value, so make sure that after updating the package in your project you go into the data type settings in the CMS and click Save to update the stored value to the GUID instead.
Hi @tomvanenckevort , I finally had a chance to look at this again. One thing I noticed - you might need to update the Our page, since it is listing the older version as "current":
It installed fine, so this is more "cosmetic" than blocking....
@hfloyd Thanks for pointing that out, I've updated the version number now.
@tomvanenckevort Thanks for your help with the various issues I have been experiencing. Once I had it working beautifully on my local site, I pushed it to my Umbraco Cloud environment, and it broke 😢.
It was trying to "wrap" the wrong DataType on the Cloud environment. I can see that the generated UDA file is storing an INT for the datatype id, whereas a GUID would be better for Cloud/Deploy purposes, since INT Ids vary between environments, but GUIDs do not.: