BuddyDev

Search

[Resolved] BP notification are offset

  • Participant
    Level: Initiated
    Posts: 6
    Pedro on #39839

    Hi guys,

    It’s probably not a bug of BP Multinetwork but does anyone know why the notifications are displayed with an offset? In my case 5 hours ago which is UTC time.
    Both WP and my server are set to UTC-5 so all the datetimes are displaying correctly on the website except for BP notifications. It looks like it’s using post_date_gmt instead of post_date

    Thanks

  • Participant
    Level: Initiated
    Posts: 6
    Pedro on #39840

    Sorry for posting here and you don’t have to reply. I’ll inform bbpress instead.
    Actually the issue seems to only happen for forum notifications (I’m using youzify), all the other notifications have the right datetime.
    Looking at the table wp_bp_notifications, the field date_notified is set to :
    – UTC-5 for bbp_new_reply component_action
    – UTC for all other actions
    I even tried installing bbp style pack as suggested here with no luck :
    https://bbpress.org/forums/topic/the-time-zone-is-off-by-7-hours-in-my-bbpress-plugin-forums/
    I think I’ll have to hook into the call to fix this as I don’t see a timezone setting for bbpress

  • Participant
    Level: Initiated
    Posts: 6
    Pedro on #39841

    Now I will close this thread by saying I forgot to look at the logs.
    First I get a warning when publishing a reply in a forum :
    [30-Jul-2021 03:23:17 UTC] PHP Deprecated: get_option was called with an argument that is deprecated since version 5.5.0! The “blacklist_keys” option key has been renamed to “disallowed_keys”. in /var/www/wordpress/wp-includes/functions.php on line 5367

    Then I get an error while displaying the notification to the user :
    [30-Jul-2021 03:23:29 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function bbp_format_buddypress_notifications(), 5 passed in /var/www/wordpress/wp-includes/class-wp-hook.php on line 303 and exactly 8 expected in /var/www/wordpress/wp-content/plugins/bbpress/includes/extend/buddypress/notifications.php:62
    Stack trace:
    #0 /var/www/wordpress/wp-includes/class-wp-hook.php(303): bbp_format_buddypress_notifications()
    #1 /var/www/wordpress/wp-includes/plugin.php(233): WP_Hook->apply_filters()
    #2 /var/www/wordpress/wp-content/plugins/youzify/includes/premium/public/core/functions/youzify-live-notifications-functions.php(83): apply_filters_ref_array()
    #3 /var/www/wordpress/wp-content/plugins/youzify/includes/premium/public/core/functions/youzify-live-notifications-functions.php(27): youzify_get_the_notification_description()
    #4 /var/www/wordpress/wp-includes/class-wp-hook.php(303): youzify_process_notification_request()
    #5 /var/www/wordpress/wp-includes/plugin.php(189): WP_Hook->apply_filters()
    #6 /var/www/wordpress/wp-admin/include in /var/www/wordpress/wp-content/plugins/bbpress/includes/extend/buddypress/notifications.php on line 62

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2952
    Ravi on #39842

    Hello,

    Thank you for the acknowledgment. I am glad that the issue is resolved.

    Regards
    Ravi

The topic ‘ [Resolved] BP notification are offset’ is closed to new replies.

This topic is: resolved