Copied to clipboard

Flag this post as spam?

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


  • MrFlo 159 posts 403 karma points
    Apr 17, 2015 @ 14:43
    MrFlo
    0

    Culture related problem with Macro or to get properties - Level Ninja

    Hello,

    We are developping a site in the Azeri language and we have a serious problem on the site.

    Some macro don't get parameters and some fields like page name are not rendered in the title tag.

    As soon as I swithc the culture to english all the site is woking well again. This is pretty strange and I've try with all Azeri cultures. The page name are in Azeri language as well. 

    I thought it was coming from some parameters in the dictionnary but when I change the culture to for example Azeri-Latin they are are not loaded and the site is still not working.

    Any help or view on this? It's a hard one this one ;-) 

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 17, 2015 @ 14:59
    Jan Skovgaard
    0

    Hi MrFlo

    What kind of errors do you get when setting the Azeri-Latin culture? Have you checked the /App_Data/Logs file? And what version of Umbraco are you using? And what parameters are being passed to your macro? And what does the macro code look like?

    /Jan

  • MrFlo 159 posts 403 karma points
    Apr 17, 2015 @ 15:07
    MrFlo
    0

    Hi,

    Sorry to not mention the version 7.2.2, It's a gallery macro inserted in the wysiwig editor with media picker.

    Nothing in the log file, it's published correctly. It's exactly the same parameters as from the EN version and same code.

    It's really a mysterious problem. Any idea on what can cause this kind of problem?

    MrFlo

     

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 17, 2015 @ 15:12
    Jan Skovgaard
    0

    Hi MfFlo

    Ok, but what does the code look like? Could you please share? :)

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 17, 2015 @ 15:15
    Jan Skovgaard
    0

    Is there other parts of the website that does something else if it's the Azeri culture? Something that gets rendered exclusively on this page - Not content I get that it will differ but some functionality that exists on one language but not on another? Could it be caused by some rendered HTML not being properly closed causing this particular macro to act up? Is the page title not rendered in the source code at all? Or is it in the source but rendered weirdly?

    /Jan

  • MrFlo 159 posts 403 karma points
    Apr 17, 2015 @ 15:26
    MrFlo
    0

    Hi Jan,

    Here is the macro code. But your second  message is more probably close to what's going on I suppose. I'm seeing nothing strange for now, just some texts are loaded through the dictionnary. 
    The title tag is not rendered at all in sources but yes if it's inside the field "page title", and this only in Azeri. Here is the code as well:

    <title>@Umbraco.Field("pageTitle", altFieldAlias: "pageName") @Umbraco.Field("siteName", recursive: true, insertBefore: " - ")</title>
    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    
    @if(Model.MacroParameters.ContainsKey("galleryImages"))
     {
        var imageDescriptionAlias= Umbraco.Field("#CurrentLanguage")+"Description";
        var slideshowImagesList =  Model.MacroParameters["galleryImages"].ToString().Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
        var slideshowImagesCollection = Umbraco.TypedMedia(slideshowImagesList).Where(x => x != null);
    
        <ul class="clearing-thumbs small-block-grid-3 horizontalList gallery" data-clearing>
                @foreach(var item in slideshowImagesCollection){
                <li>
                    <a href="@Umbraco.Media(item.Id).GetCropUrl("Fullscreen")">
                        <img data-caption="@item.GetPropertyValue(imageDescriptionAlias)" src="@(Umbraco.Media(item.Id).GetCropUrl("GalleryThumbnail"))" alt="@item.Name">
                        <p class="greenBg txtWhite txtSmall caption">@item.GetPropertyValue(imageDescriptionAlias)</p>
                    </a>
                </li>
                }
        </ul>
     }
  • MrFlo 159 posts 403 karma points
    Apr 17, 2015 @ 15:31
    MrFlo
    0

    I've try to remove the part with the #CurrentLanguage thing in the the macro as well but still the same. It's really only the parameter galleryImages that is empty.

    I was more thinking about encoding issue or special char. problem somewhere ?

     

  • MrFlo 159 posts 403 karma points
    Apr 20, 2015 @ 10:32
    MrFlo
    0

    Hi Jan,

    So there is nothing specific in my page for the Azeri language. In umbraco there are four different Azeri languages, I've tried all of them but it's the same thing.
    There are no entries of course in the dictionnary for these so some fields are empty. So it's not coming from the dictionnary.

    If I choose french or whatever languages, it's working fine.

    I am now looking for may be a database collation problem or something around this.

    Does someone has a culture problem on SQL ? Is there a recommended collation? Mine is Latin1_General 

    Thanks.

  • MrFlo 159 posts 403 karma points
    Apr 20, 2015 @ 11:20
    MrFlo
    0

    I have done a fix for now but this problem is stil there.
    I have created a macro without parameter and this is working but this is still unresolved. 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 22, 2015 @ 17:46
    Jan Skovgaard
    0

    Hi MrFlo

    Sorry for the late answer - Just wondering what database you're using? Is it MSSQL or MySQL?

    /Jan

  • Daniel Quick 22 posts 74 karma points
    May 17, 2017 @ 14:16
    Daniel Quick
    0

    FWIW - I am having exactly the same issue; parameterised macros do not work (do not display at all) when the culture is set to Azeri. Switch that to EN-GB or any other common language and the macros display fine.

  • MrFlo 159 posts 403 karma points
    May 17, 2017 @ 20:08
    MrFlo
    0

    Hi Mike, I am kind of happy that I wasn't the only one 😉

Please Sign in or register to post replies

Write your reply to:

Draft