• Hi Kieran. Thanks for your many years of work to keep your plugin up and running. The good news is that it still works. The bad news is that since WP5.3, the “Upcoming Events” widget may be broken (it certainly was for one of my oldest websites). I think it depends on how old your website is and what operating system it is running on.

    It seems the boys and girls at WP decided to change the “date_i18n” function. In fact, they no longer recommend its use. I’m still investigating what they have done but so far I can give you a reference to read up on it:
    Date/Time component improvements in WordPress 5.3

    Your Upcoming widget was correctly displaying all the events but, on converting the date for display using “date_i18n”, the date was shifted back 1 day (e.g. I had a public holiday event for Christmas and it came up on 24 Dec). On your code (calendar.php) on line 2044 (of version 1.3.13) I changed the “date_i18n” function to “wp_date” as recommended by the boys and girls at WP. That fixed the problem. This is your only use of “date_i18n”. Hope you find this useful to create a new version for your plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Kieran O’Shea

    (@kieranoshea)

    Thank you – I will implement this change

    Plugin Author Kieran O’Shea

    (@kieranoshea)

    I received your reply by e-mail from the forum but the post is nowhere to be seen now.

    Anyhow, the time() thing – I can see the logic here, but I suspect that only works where your server’s timezone is the same as yours, which is rarely the case.

    This all stems from the removal of the date_i18n() function. While the docs assert that the new function it wraps is equivalent/better, this is clearly not the case and there are issues being caused.

    I will try and get to the bottom of this, but in the interests of expediency I may end up bringing that function into the calendar plugin as a private function.

    Thread Starter dccharron

    (@dccharron)

    Hi @kieranoshea

    Thanks for responding. I was shocked to discover my support post was blown away like that. Perhaps the WordPress moderator didn’t like my revelation that they had screwed up the behaviour of the basic PHP “time()” function? They even closed the topic so I couldn’t repost. Perhaps I breached one of their “rules”? If so, I have no idea which one, so I may well do it again someday. No learning possible when they behave this way. I’m going to complain to them and try to get to the bottom of this rude behaviour.

    Thanks for looking into the problem.

    Any update on correcting this issue?

    Thread Starter dccharron

    (@dccharron)

    No official updates from Kieran yet. There is a workaround. Change your timezone in Settings => General to UTC+0.

    Plugin Author Kieran O’Shea

    (@kieranoshea)

    Things have been a little crazy recently, I’ll try to take a look at this in the coming weeks

    In the interim I have replaced the wp_date function with date_i18N on row 2082 of calendar.php. The correct date now shows up on the widget since date_i18n is still defined in functions.php.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP 5.3 broke Upcoming widget’ is closed to new replies.