Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author John Clause

    (@johnclause)

    This fix is applied in -X since long time ago, look at the code qtranslate_core.php:812, and nothing in this regard was changed recently.

    How can we reproduce the problem?

    Hello!
    After migrating from mqtranslate to qtranslate-x I also got this bug.
    $date = get_the_date( 'Y' );
    or
    $date = the_date('Y', '', '', FALSE);
    $date returns Y character instead of formatted post date.
    If $format is not specified get_the_date(), it returns proper post date that formatted according to WP options.
    WP v.4.1.1

    Thread Starter Peter Hardy-vanDoorn

    (@petervandoorn)

    Hi @vjpo – glad to hear it’s not just me ??

    I’ve got around the problem by getting the date directly from the post data:

    $date = date('Y', strtotime($post->post_date))

    Hope you find that useful.

    Plugin Author John Clause

    (@johnclause)

    Hi guys, I did not have much time to research this issue, but I copied some date/time code from mqTranslate, which I noticed to be different.

    Could you do me a favor, please test the latest version from GitHub, which you can download with ‘Download ZIP’ button on GitHub page or press here for the sake of convinience? Does it solve this problem?

    Hi Piter!
    Thanks a lot for the trick! It implememted on site and works )

    Hi John, I’ll try and report here.

    Thread Starter Peter Hardy-vanDoorn

    (@petervandoorn)

    Hi John

    Yes, that’s fixed it, thanks.

    I also did some extra testing prior to this and discovered that the problem was being caused by the date/time conversion setting being “Use strftime instead of date”. Changing that to “Use emulated date function” had fixed it.

    Cheers

    Plugin Author John Clause

    (@johnclause)

    So, do now both “Use strftime instead of date” and “Use emulated date function” work as supposed to?

    Thread Starter Peter Hardy-vanDoorn

    (@petervandoorn)

    Yes. As far as I can tell, the dates are now displaying for both settings.

    As to whether they are working as they’re supposed to, well, can’t answer that as I’ve no idea what the difference is anyway ??

    for me it seems only “Use strftime instead of date” is working correctly. i customized the date format under general settings. the new date format is only working correctly, if i use “Use strftime instead of date” in qtranslatex.

    related question: what is “[…] replace formats with the predefined formats for each language” doing exactly? does that mean that any customization of the date formats will have no effect, right?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘old get_the_date bug is back!’ is closed to new replies.