Skip to:

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5403 closed defect (bug) (fixed)

Bug in the notifications

Reported by: elpix Owned by: boonebgorges
Milestone: 2.0 Priority: low
Severity: minor Version: 1.9.2
Component: Toolbar & Notifications Keywords:
Cc: stergatu@…


Hi there,

There is a bug in the notifications, here is a screen :

You see an empty white box below "Notifications".

Do not hesitate to contact me for more information.


Attachments (2)

bug_notifications.jpg (30.5 KB) - added by elpix 6 years ago.
Print screen
bp-notifications-buddybar.php.patch (587 bytes) - added by lenasterg 6 years ago.
notifications buddybar patch

Download all attachments as: .zip

Change History (14)

6 years ago

Print screen

#1 @boonebgorges
6 years ago

  • Milestone Awaiting Review deleted
  • Priority changed from highest to low
  • Resolution set to wontfix
  • Severity changed from major to minor
  • Status changed from new to closed

It looks like this is an issue related to your use of the Buddybar, which we're no longer supporting. You are urged to migrate to the WordPress Admin Bar.

define( 'BP_USE_WP_ADMIN_BAR', true );

#2 @elpix
6 years ago

So we can't use the bp bar anymore ?
The WP bar is cheap compared to the buddybar :(

#3 @boonebgorges
6 years ago

You can use the Buddybar, but we're no longer supporting it officially. In fact, in the next few versions of BuddyPress, we are likely to begin deprecating it more aggressively; see #5390.

If there are aspects of the WP bar that you think are worse than the Buddybar, please feel free to point them out. We think the WP bar is better in pretty much every way, but it's possible that we're missing something :)

#4 @lenasterg
6 years ago

  • Cc stergatu@… added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Hi. There is a bug on
bp-notifications/bp-notifications-buddybar.php which on debug mode gives

<b>Warning</b>: number_format() expects parameter 1 to be double, array given in <b>/wp-includes/functions.php</b> on line <b>155</b><br />

Maybe this is related.
I attach the patch.

6 years ago

notifications buddybar patch

#5 @lenasterg
6 years ago

Or another solution is to replace at line 30 of bp-notifications/bp-notifications-buddybar.php the bp_notifications_get_notifications_for_user()

if ( $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id() ) ) : ?>

with bp_notifications_get_unread_notification_count() which will return integer.

#6 @boonebgorges
6 years ago

  • Milestone set to 2.0

Thanks, lenasterg. This looks right.

#7 @boonebgorges
6 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from reopened to closed

In 7913:

Use the correct function to get notification unread count for buddybar

Fixes #5403

Props lenasterg

#8 @lenasterg
6 years ago

I noticed that in various places the number_format_i18n() is used. Is this correct or should be changed to bp_core_number_format()?

#9 @lenasterg
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Unfontunatelly using bp_notifications_get_unread_notification_count() created bug on line 39 of the same file, in the loop of displaying the unread notifications. So I think the patch is more appropriate to use.

#10 @boonebgorges
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 7920:

Fix Buddybar notification formatting bug introduced in r7913

Fixes #5403

#11 @elpix
6 years ago

So what I have to do ?
Just wait for the next release of BP ?

#12 @lenasterg
6 years ago

@elpix hi.
I think you would be OK if you replace in the /buddypress/bp-notifications/bp-notifications-buddybar.php file the function bp_notifications_buddybar_menu(){...
with the version which is in from line 21 to 56.

Note: See TracTickets for help on using tickets.