You don't need the UI hint. The error states that you cannot convert a string to XhtmlString. Are you trying to set the value of the property Text somewhere in your code? E.g.:
currentPage.Text = "a text";
Im guessing that the property used to be a regular string and some text was added to that property in edit mode making it invalid for xhtmlstring.
Remove the text from the property in edit mode and if needed remove the property from the pagetype from admin mode, then rebuild and try again.
I want to have a XHTMLString property so that the editors can edit the text as they want. I have tried with and without the attribute [UIHint(UIHint.LongString)] and it causes the same error:
the code, HTML and EPiServer property:
What am I missing? I'm using EPiServer 7