• Resolved flowster

    (@flowster)


    Hi,
    We get this message on the events page:

    Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (2024-07-04 11:i A) at position 11 (1): Unexpected character in /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/class-eventprime-functions.php:1697 Stack trace: #0 /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/class-eventprime-functions.php(1697): DateTime->__construct(‘2024-07-04 11:i…’) #1 /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/class-eventprime-functions.php(5009): Eventprime_Basic_Functions->ep_get_event_date_time_diff(Object(stdClass)) #2 /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/class-eventprime-functions.php(4480): Eventprime_Basic_Functions->get_multiple_events_post_data(Array) #3 /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/public/partials/events/list.php(10): Eventprime_Basic in /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/class-eventprime-functions.php on line 1697

    • This topic was modified 8 months, 3 weeks ago by flowster.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support EventPrime Support

    (@eventprimesupport)

    Thanks for reporting this issue

    We are looking into it and will get back to you with an update soon.

    Plugin Support EventPrime Support

    (@eventprimesupport)

    Thank you for reaching out. To resolve the issue, please follow these steps:

    1. Navigate to your WordPress dashboard.
    2. Go to “Events” -> “Settings”.
    3. Click on the “General” tab.
    4. Select the “Setup” subtab.
    5. Locate the “User Input Date Format” option and select your preferred date format.

    If the issue persists please let us know. We are here to help!

    jacksondimedaughter

    (@jacksondimedaughter)

    Not sure why this was marked as resolved, since EventPrime’s “solution” won’t fix anything. The problem, if they’d bothered to look at the logs provided by the original reporter, is the time picker format they’ve specified in the admin scripts isn’t recognised by the timepicker jQuery plugin they’re using. It’s saving the time as “{hour}:i A” which then can’t be parsed by the DateTime constructor (and they’ve done no validation/error handling on the date parsing, which is just reckless).

    If you want to fix it yourself you need to edit {plugin path}/admin/js/em-admin-metabox-custom.js and replace all instances of “h:i A” with “h:mm TT”

    I have this problem too. The troubleshooting from jacksondimedaughter works.
    But this should also be fixed in the plugin. You can’t edit the file after every update.

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