Did it stop working on all pages? Changed the content of those pages? I've had something like it a v6 and it had something to do with a change in content. For some reason razor didn't see it as a htmlstring but as another type & couldn't convert it to a htmlstring..
Yes it stopped working on all pages, but nothing changed on those pages. Apparently the website was offline this morning for a very short period and after that we got this problem.
Do you know if any Windows updates were installed on the server?
We had a similar situation a few days ago in C# (not Razor) where suddenly it stopped being able to convert string to HtmlString having worked previously...
What's the property type of BodyText? Is there a property converter attached, that would natively return an IHtmlString? Can you try with IHtmlString vs HtmlString (notice the I for Interface)?
GetPropertyValue<HtmlString> not working
Hello,
We've got a live website and suddenly the content wasn't displayed anymore. The content was rendered like this:
After switching it to this it did work again:
The first one did used to work so I don't know why only the second version now works.
Running Umbraco 6.0.1.
Jeroen
Did it stop working on all pages? Changed the content of those pages? I've had something like it a v6 and it had something to do with a change in content. For some reason razor didn't see it as a htmlstring but as another type & couldn't convert it to a htmlstring..
Yes it stopped working on all pages, but nothing changed on those pages. Apparently the website was offline this morning for a very short period and after that we got this problem.
Jeroen
Hi Jeroen,
I think it was the issue of the caching.
If you have republished the entire site and restarted App Pool than it might work.
Regards,
Urvish Mandaliya
Do you know if any Windows updates were installed on the server?
We had a similar situation a few days ago in C# (not Razor) where suddenly it stopped being able to convert string to HtmlString having worked previously...
What's the property type of BodyText? Is there a property converter attached, that would natively return an IHtmlString? Can you try with IHtmlString vs HtmlString (notice the I for Interface)?
Stephan
The BodyText is an RTE and no custom property converter is attached. I tried both IHtmlString and HtmlString, but they both stopped working.
Jeroen
Jeroen,
Maybe off the mark but can you check your internal index not sure if it is used at all and if its borked?
Regards
Ismail
Weird. Nothing in the log that would eg report that the converters are not initalizing properly?
Nope didn't find anything. For now I'll just keep using Html.Raw with GetPropertyValue<string>.
Jeroen
is working on a reply...