Kentico 9: Export Error when having same Field Name with different data type for multiple PageTypes

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…

6 thoughts on “Kentico 9: Export Error when having same Field Name with different data type for multiple PageTypes”

  1. Thank you for the good writeup. It in fact
    was a amusement account it. Look advanced to more added agreeable
    from you! However, how can we communicate?

  2. This is really attention-grabbing, You’re an excessively professional
    blogger. I’ve joined your feed and stay up for seeking more of your excellent post.
    Additionally, I have shared your website in my social

Leave a Reply

Required fields are marked *