I upgraded one of my Kentico 8.2 site into Kentico 9.0, everything was looking pretty and working smoothly after upgrade. But when I tried to export my site, I got Exception with following statement.
“Conversion failed when converting from a character string to uniqueidentifier”.
I spent my lots of hours to find a cause, because everything was working fine and in Kentico 8.2 I was able to export site successfully.
Finally with the help of Kentico support team, I got the exact cause of this problem , it was the issue because of in my application I had two ‘Page Types’ which were having same ‘Field Name’ with different ‘Data Types’, Like follows:
Page Type Field Name Field Type
Custom.MediaItem FileAttachment Text
CMS.File FileAttachment File
So conclusion is that, from Kentico 9 we need to take care of fields name and its data type specially in our custom page type.
Kentico best practice says, for any custom page type we should always use ‘Page Type’ code name as prefix for each field e.g. “MediaItemFileAttachment” as in my case.
Hope this post will be helpful…