Skip to:
Content

bbPress.org

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#3213 closed defect (bug) (fixed)

Incorrect value passed for new reply notification in buddypress

Reported by: seennothurd's profile seennothurd Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.6 Priority: high
Severity: major Version: 2.5
Component: Extend - BuddyPress Keywords: needs-testing
Cc:

Description

The value passed into the item_id key of the array of args for bp_notifications_add_notification (includes/extend/buddypress/notifications.php:149) does not match the value expected for the notification formatting (includes/extend/buddypress/notifications.php:70).

The value the formatting function expects is the reply ID. The value passed along from the bp_notifications_add_notification function is the topic ID of that reply. This means the bbp_get_reply_url function returns a useless url, which in the case of Buddypress causes an redirect loop.

This means users cannot get to the new reply as notified.

Attachments (1)

3213.patch (1.9 KB) - added by johnjamesjacoby 5 years ago.

Download all attachments as: .zip

Change History (6)

#1 @johnjamesjacoby
6 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Version changed from trunk to 2.5

#2 @johnjamesjacoby
6 years ago

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

In 6845:

BuddyPress: use $reply_id instead of $topic_id so bbp_get_reply_url() works correctly.

This change ensures that notification links go directly to the reply, not the topic, and not a 404.

Fixes #3213. See #3214.

#3 @johnjamesjacoby
5 years ago

  • Keywords needs-testing added; commit removed
  • Milestone changed from 2.6 to 2.6.6
  • Priority changed from normal to high
  • Resolution fixed deleted
  • Severity changed from normal to major
  • Status changed from closed to reopened

This change has caused bbp_buddypress_mark_notifications() to stop working as intended.

Or bbp_format_buddypress_notifications() is using the wrong ID to create the wrong URL.

Going to reopen this to look into it further for 2.6.6.

#4 @johnjamesjacoby
5 years ago

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

In 7109:

BuddyPress: Mark all replies when marking topic notifications as read.

This commit fixes a regression - introduced in r6845 - that was causing marking topic notifications as read to fail. It fixes it by looping through all replies to a topic and attempting to mark them all individually. It is not a particularly optimized approach, but it does resolve the regression in such a way that accounts for both topic IDs and reply IDs.

In branches/2.6, for 2.6.6.

Fixes #3213.

#5 @rimanil
3 years ago

Resolution set to fixed
Status changed from reopened to closed

Note: See TracTickets for help on using tickets.