Two months missing from dropdown

  • Hi!

    Somehow there are two months missing from the date dropdown-field when creating or editing blog posts. It has worked before and I can't remember making any changes that could have affected this, other than changing the server PHP version to a higher one (7.2). The affected months have ä (a umlaut) in them. I even tried lowering the PHP version but it didn't help.


    I attached a screenshot of the problem. Might anyone have first-hand knowledge or tips for me to solve this problem? I will be grateful for any help on this matter! :)


    Kind regards,

    Tenttu

  • Hi Tenttu


    Thank you for your patience on this, we have made a small fix for this, please could you go to file perch/core/lib/api/PerchAPI_Lang.class.php


    and replace function load_translations with this update and let us know if the error is fixed please?


  • Hi Gareth S !

    Thank you for your answer! I just tried that fix and sadly it didn't work. We have 3 websites using Perch and they all have this same problem. I tried the fix for all three websites and it didn't work on any of them. I also tried clearing browser cache and tried Chrome & Firefox after replacing the function.

    What could be causing this problem? Like my original example picture shows, the months are in finnish and the only ones missing are June (in finnish kesäkuu) and July (in finnish heinäkuu).

    I greatly appreciate any further steps, tips/tricks and help regarding this problem! :)

    Kind regards,
    Tenttu

  • Hi Tenttu


    Sorry that didn't work! It appears to be tied to characters with accents, as we've seen the same issue on some of the French months. I'll go back to our technical team now to let them know this hasn't resolved it, I'll update you asap!


    Kind regards,

    Gareth

  • Hi Gareth S !

    Could you refresh my memory, where are the translated words located? It's been quite a while since I setup Perch and the Blog addon and I'm at my summer cottage at the moment. I could then check the translation file on monday, when I'm back at the office. :)

    Kind regards,
    Tenttu

  • Hi Byron Fitzgerald !

    Thank you for your answer. I checked and I haven't done any modifications in those folders/files ever. I only have the default en-gb files inside the lang folders (core and app-specific). So it seems the month names are being translated automatically and somehow the two months that include ä characters (a umlaut) are showing blank as seen in the screenshot in my original post. :)

    Kind regards,
    Tenttu

  • If that's the case the issue is unlikely to be due to perch translations and more likely a locale issue with the date field type. The date picker field type utilises strftime to get a list of months, this relies on the locale set.


    You could try using setlocale() to update the locale english which should then show all the months correctly. If the rest of the site is also in English it would make sense as well to do so.