Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Marius Hänel
    Participant

    Hey everyone,

    I’ve found an issue with the countdown date combined with a translation.
    I’m using the plugin in a german region with a german translatet WordPress installation. When I select the countdown date, the selected month is translated to german as you can see in this picture https://ibb.co/LDwdCKh.

    This translated datestring can’t be converted into a PHP date object so the banner won’t show on the page until I disable the countdown.

    We’re not using any translation plugins.

    I hope you can fix this problem in the next updates.
    I would change the month name into the number (i.e. 12 instead of December) or change the datepicker output into a timestamp instead of using the datestring.

    Best regards,
    Marius

    Hi Marius,

    Thanks for using Announcer PRO.

    I’m not sure why the translation plugin is modifying admin fields. Can you please let me know the name of the plugin you are using ?

    For now can you please enter the countdown date manually in the below format ?

    2022/12/31 23:00

    Thanks,
    Aakash

    Marius Hänel
    Participant

    Hey Aakash,

    thanks for your answer.

    I’m not using a translation Plugin. We’re just use a german WordPress installation from the official WordPress site.

    When I enter 2022/12/31 23:00 manually the Datepicker changed the Date automatically back to 7. Dezember 2021 00:00 on click outside of the input.

    I guess it’s maybe a region based feature from the UI-Datepicker with the used Settings.

    I “fixed” this problem for myself temporarily with a code change but as long as I have no other solution I’m not able to update the Plugin without override my quick fix changes.

    Best regards,
    Marius

    Hi Marius,

    Got it. The date picker should not be affected though user language is different. I’ll test it out at my end.

    Thanks,
    Aakash

    Hi Marius,

    I tried with German language. After picking the date/time or saving the announcement, the countdown timer value was not translated.

    I guess some other plugin is tapping into the request and changing the value.
    Any guess on which plugin might be doing this ?

    (or) some browser extension ?

    Also can you please share the changes you made to fix this issue ? I would make a note of it in case this issue is seen widely with many users.

    Thanks,
    Aakash

    Marius Hänel
    Participant

    Hey Aakash,

    thanks for checking my problem.
    I’ve set up a new WordPress installation without any other plugin and there it works.
    I have no idee which other plugin caused this problem.
    In the next few days I will check which Plugin caused the problem.

    I’ve made this change to solve the problem for me:
    In the file includes -> display.php in line 277 I changed this line
    $countdown_time = new DateTime( $settings[ 'cdt_countdown' ], new DateTimeZone( $wp_timezone_name ) );
    To this
    $countdown_time = DateTime::createFromFormat('j. F Y H:i', $settings[ 'cdt_countdown' ]);

    But I guess it will only work when you have the same Datetime format like me (i.e. 7. Dezember 2021 00:00) in the Datepicker.

    Best regards,
    Marius

    Hi Marius,

    Sure please do see if you are able to identify the plugin and check of there is any option provided by them to disable this.

    Otherwise for now let it be as is.

    Since this is an internal field, We cannot make it as a configurable option.

    So I’ll update you on case of an update relased for the plugin, then you can make same change as now.

    If I get any new idea, I’ll update accordingly.

    Thanks,
    Aakash

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter