The timezone could not be found in the database

Home Forums Calendar Products Events Calendar PRO The timezone could not be found in the database

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1410709
    Ottó Radics
    Participant

    I receive the following errors if I enable The Events Calendar Pro:

    [21-Dec-2017 12:41:47 UTC] PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (NULL) at position 0 (N): The timezone could not be found in the database in /var/www/html/assets/plugins/events-calendar-pro/src/admin-views/widget-admin-countdown.php:31
    Stack trace:
    #0 /var/www/html/assets/plugins/events-calendar-pro/src/admin-views/widget-admin-countdown.php(31): DateTime->__construct('NULL')
    #1 /var/www/html/assets/plugins/events-calendar-pro/src/Tribe/Countdown_Widget.php(93): include('/var/www/html/a...')
    #2 /var/www/html/wp-includes/class-wp-widget.php(507): Tribe__Events__Pro__Countdown_Widget->form(Array)
    #3 /var/www/html/wp-admin/includes/widgets.php(243): WP_Widget->form_callback(Array)
    #4 /var/www/html/wp-admin/includes/widgets.php(48): wp_widget_control(Array, Array)
    #5 /var/www/html/wp-admin/widgets.php(401): wp_list_widgets()
    #6 {main}
    thrown in /var/www/html/assets/plugins/events-calendar-pro/src/admin-views/widget-admin-countdown.php on line 31

    This fails silently, so no indication on the admin, but /wp-admin/widgets.php is broken and no way to edit the already added widgets.

    The error appears only if ‘Use the local timezones for each event’ is set on page /wp-admin/edit.php?post_type=tribe_events&page=tribe-common&tab=general If it is set to ‘Use the sitewide timezone everywhere’ then no errors raised.

    Plugin version is the latest (4.4.20.1).

    #1411664
    Barry
    Member

    Hi there Ottó,

    I’m sorry to hear you’ve hit up against this.

    I seem unable to replicate, unfortunately, and I am also curious because the stack trace you shared suggests that at least one of the events the countdown widget is trying to show does not have a start date/start time.

    We can certainly tighten this code up to test for that, but I’m unsure why this would happen in the first instance. Is it at all possible for you to perform our standard conflict testing steps and see if something else is ‘getting in the way’?

    I do realize you noted having performed those steps when you first opened the topic. If they didn’t make any difference that’s fine, no need to repeat – I just wanted to confirm if these had been followed and what the result was.

    Thanks!

    #1411769
    Ottó Radics
    Participant

    Hi Barry, thanks for your reply!

    I think it is more related to the fact that I manually imported events into WP’s database from a previous system (using MySQL). I didn’t add timezone data to the events during the import or after that – so the error is not a false positive, because events definitely miss timezone data – my suggestion is that when this happens, the widget screen of WP still should not crash or fail to load.

    #1411832
    Barry
    Member

    Agreed! I’ve logged a bug about this and we’ll drop an update in here once a fix is available 🙂

    #1411837
    Ottó Radics
    Participant

    Cool, thank you, waiting for the update! Merry Christmas for you! 🙂

    #1415697
    Barry
    Member

    Thanks – and a happy new year to you 🙂

    #1436458
    Nico
    Member

    Hi there,

    Just wanted to share with you that a new maintenance release (for the Week of 7th January 2018) is out, including a fix for this issue :slightly_smiling_face:

    Find out more about this release → https://theeventscalendar.com/maintenance-release-week-7-january-2018/

    Please update the plugins and let us know if the fix works for your site,
    Best,
    Nico

    #1436486
    Ottó Radics
    Participant

    Dear Nico,

    thanks for the credits and for letting me know! 🙂 I will check it out and ping back if it needs further tweaks.

    Regards,
    Ottó

    #1437051
    Barry
    Member

    Excellent 🙂

    #1456330
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘The timezone could not be found in the database’ is closed to new replies.