Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mo 34 posts 54 karma points
    Sep 01, 2010 @ 00:28
    Mo
    0

    Tab Titles and non-english languages = corrupt text

    I am facing a strange problem...


    In Member Type:

    1. Add tab with title e.g:
    2. After Saving; umbraco refreshes and tab title appears correctly as
    3. Proceed to making changes to Member Type, saving. Umbraco refreshes.
    4. After refresh, Tab Title appears as ???????? ???????.

    I tried opening the cmsTab table in the database, and correcting the corrupted text. It saves normally from SQL Server Management Studio, but the minute I update the member type again it reverts to question marks.

    Help!

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Sep 01, 2010 @ 07:07
    Steen Tøttrup
    0

    Sounds like a typical unicode/double byte problem. Which language are you typing the text in?

    Have you tried doing this on other tabs? Is it just with member type tabs the problem appears?

     

  • Mo 34 posts 54 karma points
    Sep 01, 2010 @ 10:12
    Mo
    0

    the website is Arabic only.

     

    I think the issue is in the sql script that updates/saves to the cmsTab table. Probably doesn't have the N prefix. Problem is, I don't know where Umbraco has it's SQL operations!!! Any help? I can easily fix this if I know in which part of the source the sql operations are defined...

     

    Haven't tried it on document type tabs, since I'm not using tabs on templates.

     

    I'm using osmembercontrols though, so am taking advantage of it's ability to display the member profile according to the tabs in the member type.

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Sep 01, 2010 @ 11:14
    Steen Tøttrup
    0

    I'm pretty sure it's the missing N, I'll see if I can locate the SQL and tell you which class to look at (and fix). You should probably report the error on Umbraco's codeplex page, when we locate it.

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Sep 01, 2010 @ 17:12
    Steen Tøttrup
    0

    I think I\ve found it, in umbraco.cms.businesslogic (cms.dll), ContentType, the SetTabName method.

    SqlHelper.ExecuteNonQuery("Update  cmsTab set text = '" + Caption + "' where id = " + tabId);

    // Remove from cache
    FlushFromCache(Id);

    Looks like this needs to use a parameter instead, that would also be more secure.

     

  • Mo 34 posts 54 karma points
    Sep 06, 2010 @ 23:34
    Mo
    0

    Hi Steen,

     

    Could you by any chance make a build of cms.dll with the fix and send it to me? I haven't worked directly with the umbraco source till now.

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Sep 07, 2010 @ 07:35
    Steen Tøttrup
    0

    Which version is your site running on? 4.0.x or 4.5.x ?

     

Please Sign in or register to post replies

Write your reply to:

Draft