• Resolved sabri2502

    (@sabri2502)


    Hello, since today I get an error on the booking page and wordpress sent me an e-Mail with the error details which are the following:

    ==============
    An E_ERROR type error was generated on line 154 of the file /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/Booking.class.php. 
    Error message: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, DateTime given in /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/Booking.class.php:154
    Stack trace:
    #0 /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/Booking.class.php(154): date('F j, Y H:i', Object(DateTime))
    #1 /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(691): rtbBooking->format_timestamp(Object(DateTime))
    #2 /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(748): rtbBookingsTable->column_default(Object(rtbBooking), 'submitted-by')
    #3 /home/www/nuraghe535-neu/wp-includes/class-wp-hook.php(307): rtbBookingsTable->add_details_column_items(Array, Object(rtbBooking))
    #4 /home/www/nuraghe535-neu/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
    #5 /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(676): apply_filters('rtb_bookings_ta...', Array, Object(rtbBooking))
    #6 /home/www/nuraghe535-neu/wp-admin/includes/class-wp-list-table.php(1450): rtbBookingsTable->column_default(Object(rtbBooking), 'details')
    #7 /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(495): WP_List_Table->single_row_columns(Object(rtbBooking))
    #8 /home/www/nuraghe535-neu/wp-admin/includes/class-wp-list-table.php(1377): rtbBookingsTable->single_row(Object(rtbBooking))
    #9 /home/www/nuraghe535-neu/wp-admin/includes/class-wp-list-table.php(1362): WP_List_Table->display_rows()
    #10 /home/www/nuraghe535-neu/wp-admin/includes/class-wp-list-table.php(1289): WP_List_Table->display_rows_or_placeholder()
    #11 /home/www/nuraghe535-neu/wp-content/plugins/restaurant-reservations/includes/AdminBookings.class.php(107): WP_List_Table->display()
    #12 /home/www/nuraghe535-neu/wp-includes/class-wp-hook.php(307): rtbAdminBookings->show_admin_bookings_page('')
    #13 /home/www/nuraghe535-neu/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #14 /home/www/nuraghe535-neu/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #15 /home/www/nuraghe535-neu/wp-admin/admin.php(259): do_action('toplevel_page_r...')
    #16 {main}
      thrown

    Could you kindly tell me what I should do to fix the error?
    I look forward to your reply! Thank you very much!
    Kind regards,
    Sabrina

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hello sabri,

    Could you go to Settings > Basic > Booking Form > verify that the Date Format and Time Format options contain a valid input? Did that make a difference?

    Date Format example: mmmm d, yyyy

    Time Format example: h:i A

    Jonne202

    (@jonne202)

    Hi,
    Ik think I’ve got the same problem;

    Fatal error: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, DateTime given in /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/Booking.class.php:154 Stack trace: #0 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/Booking.class.php(154): date('j F Y H:i', Object(DateTime)) #1 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(691): rtbBooking->format_timestamp(Object(DateTime)) #2 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(748): rtbBookingsTable->column_default(Object(rtbBooking), 'submitted-by') #3 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-includes/class-wp-hook.php(307): rtbBookingsTable->add_details_column_items(Array, Object(rtbBooking)) #4 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array) #5 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(676): apply_filters('rtb_bookings_ta...', Array, Object(rtbBooking)) #6 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-admin/includes/class-wp-list-table.php(1450): rtbBookingsTable->column_default(Object(rtbBooking), 'details') #7 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(495): WP_List_Table->single_row_columns(Object(rtbBooking)) #8 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-admin/includes/class-wp-list-table.php(1377): rtbBookingsTable->single_row(Object(rtbBooking)) #9 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-admin/includes/class-wp-list-table.php(1362): WP_List_Table->display_rows() #10 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-admin/includes/class-wp-list-table.php(1289): WP_List_Table->display_rows_or_placeholder() #11 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/AdminBookings.class.php(107): WP_List_Table->display() #12 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-includes/class-wp-hook.php(307): rtbAdminBookings->show_admin_bookings_page('') #13 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #14 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #15 /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-admin/admin.php(259): do_action('toplevel_page_r...') #16 {main} thrown in /customers/1/2/e/restauranthetkerkje.nl/httpd.www/wp-content/plugins/restaurant-reservations/includes/Booking.class.php on line 154
    (In Details column Bookings admin

    Nothing has changed in Date and Time format of the Booking Form and since yesterday (after I updated the plugin to version 2.5.5) I have these problems.
    In the Bookings admin page popups don’t work anymore, so bookings can’t be edited.

    At my staging environment I have equal problems, only there the errors are shown as a Notice. And the popups still work.
    `Warning: date() expects parameter 2 to be int, object given in /subdomains/restauranthetkerkje/wp-content/plugins/restaurant-reservations/includes/Booking.class.php on line 154 ’

    Thanks in advance for your help!
    Jonne

    telenova

    (@telenova)

    I have the same problem

    > Error Details
    > =============
    > An error of type E_ERROR was caused in line 154 of the file /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/Booking.class.php. Error message: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, DateTime given in /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/Booking.class.php:154
    > Stack trace:
    > #0 /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/Booking.class.php(154): date()
    > #1 /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(691): rtbBooking->format_timestamp()
    > #2 /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(748): rtbBookingsTable->column_default()
    > #3 /home/theglyxs/public_html/wp-includes/class-wp-hook.php(307): rtbBookingsTable->add_details_column_items()
    > #4 /home/theglyxs/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters()
    > #5 /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(676): apply_filters()
    > #6 /home/theglyxs/public_html/wp-admin/includes/class-wp-list-table.php(1450): rtbBookingsTable->column_default()
    > #7 /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/WP_List_Table.BookingsTable.class.php(495): WP_List_Table->single_row_columns()
    > #8 /home/theglyxs/public_html/wp-admin/includes/class-wp-list-table.php(1377): rtbBookingsTable->single_row()
    > #9 /home/theglyxs/public_html/wp-admin/includes/class-wp-list-table.php(1362): WP_List_Table->display_rows()
    > #10 /home/theglyxs/public_html/wp-admin/includes/class-wp-list-table.php(1289): WP_List_Table->display_rows_or_placeholder()
    > #11 /home/theglyxs/public_html/wp-content/plugins/restaurant-reservations/includes/AdminBookings.class.php(107): WP_List_Table->display()
    > #12 /home/theglyxs/public_html/wp-includes/class-wp-hook.php(307): rtbAdminBookings->show_admin_bookings_page()
    > #13 /home/theglyxs/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    > #14 /home/theglyxs/public_html/wp-includes/plugin.php(474): WP_Hook->do_action()
    > #15 /home/theglyxs/public_html/wp-admin/admin.php(259): do_action()
    > #16 {main}
    >   thrown
    
    Djanou

    (@djanou)

    Same problem here,

    M-iT

    (@demodirk)

    I have the same problem.
    I analysed the record in the database and date/time notation has changed from i: to O:
    All the O: records generate the issue.

    Changing the date/time format in the basic settings does not change anything.

    IMHO this is the cause of the issue:
    2.5.5 (2022-03-29)
    Updated to timezone based date/time handling throughout the plugin, to have more consistent behaviour for all users, irrespective of their timezone/server.

    I’ve put the 2.5.4 version back and the new reservations have the i: date format and cause no problem. The records with the O: format keep displaying with errors.

    s:15:\"date_submission\"	i:1648463638	s:16:\"consent_acquired\"	b:1	}'),					
    s:15:\"date_submission\"	i:1648541330	s:16:\"consent_acquired\"	b:1	}'),					
    s:15:\"date_submission\"	i:1648586678	s:16:\"consent_acquired\"	b:1	}'),					
    s:15:\"date_submission\"	O:8:\"DateTime\":3:{s:4:\"date\"	s:26:\"2022-03-31 11:59:28.735484\"	s:13:\"timezone_type\"	i:3	s:8:\"timezone\"	s:15:\"Europe/Brussels\"	}s:16:\"consent_acquired\"	b:1	}'),
    s:15:\"date_submission\"	O:8:\"DateTime\":3:{s:4:\"date\"	s:26:\"2022-03-31 15:48:05.171640\"	s:13:\"timezone_type\"	i:3	s:8:\"timezone\"	s:15:\"Europe/Brussels\"	}s:16:\"consent_acquired\"	b:1	}'),
    s:15:\"date_submission\"	O:8:\"DateTime\":3:{s:4:\"date\"	s:26:\"2022-03-31 21:20:15.558907\"	s:13:\"timezone_type\"	i:3	s:8:\"timezone\"	s:15:\"Europe/Brussels\"	}s:16:\"consent_acquired\"	b:1	}'),
    • This reply was modified 4 years ago by M-iT.
    • This reply was modified 4 years ago by M-iT.
    • This reply was modified 4 years ago by M-iT.
    M-iT

    (@demodirk)

    Temp solution: put version 2.5.4 back.
    It does not fix the existing incorrect entries but the new ones work again.
    I only had 2 incorrect entries and I deleted them using the bulk actions as clicking ‘delete’ on the reservation does nothing.

    Hope this helps till there’s a fix.

    astrosneaks

    (@astrosneaks)

    Hi M- iT,

    how do you find out which records are using the :O format ?

    Jonne202

    (@jonne202)

    Fixed it by putting the old version (2.5.0) back.
    And deleted the incorrect entries in the database.

    After that the admin page became responsive again, and new bookings work fine.
    Now wait for plugin update with bugfix, which I will test with new booking before updating production environment.

    Plugin Support jaysupport

    (@jaysupport)

    Thank you for reporting this. We’ve just pushed an update (2.5.6) that corrects the issue that was causing the error you were getting.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Plugin Error’ is closed to new replies.