Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 09, 2011 @ 07:51
    Fuji Kusaka
    0

    Error when saving dictionary item

     

    When saving a Dictionary item with a simple UL List item with link in it a get a Server Error.

    Can someone explains ?

     

    //fuji


     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2011 @ 08:16
    Jan Skovgaard
    0

    Hi Fuji

    What does the error say exactly?

    And is it HTML you're saving in the item?

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 09, 2011 @ 08:19
    Fuji Kusaka
    0

    HI Jan,

    Yes its basic Html. <ul> <li> <a href=""></a><li> </ul>

    Here is the Error output

    String or binary data would be truncated.
    The statement has been terminated.

     

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 09, 2011 @ 08:31
    Richard Soeteman
    1

    This error is related to the length of your string. It doesn't fit in the length of the dictionary field. Maybe better to not include complete HTML in dictionary items as well.

    But if you make the list smaller it will store

    Cheers,

    Richard

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 09, 2011 @ 08:37
    Fuji Kusaka
    0

    I guess so but thing is its a static Menu Item which with links that will give access to some other website.

    The trend will be applied to the other website. The menu is giving access to 8 other websites for the same client but different domain.

    Is there an alternative to this?

    //Fuji

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 09, 2011 @ 08:46
    Richard Soeteman
    0

    I Think it's better to use the multi url picker of UComponents then enter all the url's and let a macro render the results. Better seperation of logic and ui as well

    Cheers,

    Richard

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 09, 2011 @ 08:47
    Richard Soeteman
    0

    I Think it's better to use the multi url picker of UComponents then enter all the url's and let a macro render the results. Better seperation of logic and ui as well

    Cheers,

    Richard

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 09, 2011 @ 08:53
    Fuji Kusaka
    0

    But how will i add it to my Dictionary Item?and in my template?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 09, 2011 @ 09:01
    Richard Soeteman
    0

    In that case you don't need a dictionary item. Use it on a document type, maybe homepage? And call the  macro in your template instead of a dictionary item.

    Cheers,

    Richard

  • Rodion Novoselov 694 posts 859 karma points
    Nov 09, 2011 @ 23:11
    Rodion Novoselov
    0

    I've looked into the database out of curiousity - there seems to be a limit of 1000 characters (the dbo.cmsLanguageText table). Perhaps it could be possible just to loose this restriction by altering this table directly  - not that safe a hack I suppose, but I imagine it could work...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2011 @ 23:17
    Jan Skovgaard
    0

    A 1000 characters should be more than enough for the correct use of dictionary items. They are not intended to be placeholders of large amounts of HTML and ideally I don't think HTML belongs in a dictionary item.

    The way I see it dictionary items should be used in scenarios where you have multiple sites but need to display different "system" texts like for instance an error message, placeholder texts, label etc. - stuff that does not belong in content.

    In some cases it can probably make sense to store a minor amount of HTML in there but if you're storing more than 1000 characters of HTML in there you're doing it wrong in my humble opinion :)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 09, 2011 @ 23:23
    Jan Skovgaard
    0

    ...Oh and by the way - never mess with the database, it's just begging for trouble :)

  • Rodion Novoselov 694 posts 859 karma points
    Nov 09, 2011 @ 23:29
    Rodion Novoselov
    0

    Yes, Jan, I agree completely. I just tried to suggest a probable rapid solution for a case like 'we-badly-needed-it-the-day-before-yesterday' :-)

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 10, 2011 @ 12:32
    Fuji Kusaka
    0

    Hi Guys, its only now that i can get back to working on this. Is there a better way for me to add this to my multilingual website?

    I do realise this is a dictionay item where only small amount of texts is allowed but somehow i have a static menu list item which needs to be added in the template.

    //fuji

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 10, 2011 @ 16:37
    Fuji Kusaka
    0

    @Richard .... i did try the macro container which works but i dont think that will help since this menu needs to be visible on the whole website and on the FR version as well.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 10, 2011 @ 16:43
    Jan Skovgaard
    0

    Hi Fuji

    So you have this static menu - I suppose you need to translate the text in it? Then you could make a dictionary item for each of the texts and then use the umbraco.library:GetDictionaryItem('dictionary item 1') and umbraco.library:GetDictionaryItem('dictionary item 2') and so on, right?

    In the static macro you would just call the above where you need the text to be replaced with the correct text according to the culture.

    Hope this makes sense to you.

    /Jan

  • Fuji Kusaka 2203 posts 4220 karma points
    Nov 10, 2011 @ 16:52
    Fuji Kusaka
    0

    Hi Jan,

    Yes i makes sense, i was also thinking of creating a folder node outside the my EN version and use a macro to pull the info. And use the id source in dictionary item.

    But i think ill go with your suggestion. It sucks having to add a static menu a whole 120 page website!!!

     

    //fuji

     

Please Sign in or register to post replies

Write your reply to:

Draft