Copied to clipboard

Flag this post as spam?

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


  • Eran 292 posts 436 karma points
    Sep 14, 2011 @ 20:01
    Eran
    0

    is this package fit for site with 7 languages or so?

    hy,

    i'm using your package without any problems with 2 language site.

    now  when i added another languages, i get some razor script error:

    Error loading Razor Script /MultiLanguage/Metadata.cshtml
    An item with the same key has already been added.

    when i debug i see that it happens in this line:

     if (GetChildren(masternodeid, masterchildren).TryGetValue(lang.id, out pageid))

    by the way, what i did is like i always do without a problem with your package: i copy the entire tree and check the "relate nodes".

    do you have an idea about what can cause that problem?

    thanks.

  • Yannick Smits 321 posts 718 karma points
    Sep 14, 2011 @ 20:05
    Yannick Smits
    0

    yes I've seen this before, but don't remember exactly what i did. Have you tried republish the whole site?

    Another idea is to check if there are linked documents in your recycle bin.

    Let me know if you get it working.

  • Eran 292 posts 436 karma points
    Sep 15, 2011 @ 02:04
    Eran
    0

    from some reason my replay was deleted. strange, because i already saw it published. did you see that?..

    anyway, regarding to out subject.

    i have in my site 7 languages and i noticed that this error happens only if more than one root node of the language is unpublished.

    for example, if just the french is unpublished, everything is great and i see all the flags for the available languages (only published languages).

    but when i unpublish another language (doesnt matter which one), the error happens.

    i start to debug it but didnt find it yet. anyway, i think your languages switcher should print only languages that the root node of thier tree is in publish state.

    what do you think? can you direct me on this how to solve it?

    Thanks!

    Eran,

  • Yannick Smits 321 posts 718 karma points
    Sep 15, 2011 @ 11:08
    Yannick Smits
    0

    Hi Eran, thanks for reminding me, that was exactly what I was also experiencing, only happened when 2 nodes where unpublished. I think I made a fix back in june already but didn't publish it yet as I thought it was such an edge case.

    Could you try replacing the /App_Code/Functions.cshtml with this file:
    https://www.sugarsync.com/pf/D6723787_7248705_93682

    Let me know if it works.

  • Eran 292 posts 436 karma points
    Sep 15, 2011 @ 12:43
    Eran
    0

    great it did work! 

    if you have the time i'm interested to know what was (in general) the problem, to get better understanding.

    please add this to the next release - sometimes something that we think is edge found to be much more common...

    thanks!

    Eran.

  • Yannick Smits 321 posts 718 karma points
    Sep 15, 2011 @ 12:53
    Yannick Smits
    0

    The general problem was that the unpublished root node gives back a language id of 0 when requesting GetLanguageIdFromNodeId(child). This is ok for 1 node but with 2 nodes with the same id the dictionary crashes...

    just published release 1.1

  • Eran 292 posts 436 karma points
    Sep 15, 2011 @ 17:45
    Eran
    0

    know i get the problem, thanks for your help, great package.

Please Sign in or register to post replies

Write your reply to:

Draft