We have moved to GitHub Issues
Created by David Peck 23 Jan 2014, 14:34:35 Updated by David Peck 01 May 2014, 08:10:58
We have a multilingual site. The Turkish branch won't render any macro content, but all other languages are fine. Model.Content.GetPropertyValue("bodyText") will through the exception as with Umbraco.RenderMacro().
Sometimes you get this exception: http://our.umbraco.org/forum/ourumb-dev-forum/bugs/40979-Specified-cast-is-not-valid-on-page-request http://pastebin.com/WfF1Ydyw
Sometimes our parameters were blank.
Our work around is to change the culture to something else entirely and then force Turkish users to use the other culture.
I wonder if this is the dreaded "Turkish-I" problem with .Net.
I had this issue with Umbraco 3 and a multilingual site. Back then it manifested itself when using the <UMBRACO:ITEM ...> tag. Note the letter 'i' which would sometimes blow up when the site was running in Turkish. My workaround was to make an <UMBRACO:MACRO ...> that did the same thing as the umbraco:item. Notice there are not 'i' characters in umbraco:macro :) I also made sure that no parameters or macro names has the letter 'i' in it either. That got me going just fine.
I assumed that MS had improved things since .net2 (see http://msdn.microsoft.com/en-us/library/ms973919.aspx#stringsinnet20_topic5). But perhaps not (I haven't done a Turkish site since), or perhaps there are still some places in the code that aren't culture-sensitive that ought to be?
That's exactly it Doug. Fixed by using ToLowerInvariant instead of ToLower
Well done both! Thanks.
Backwards Compatible: True
Affected versions: 6.1.6
Due in version: 6.2.0