Skip to:
Content

BuddyPress.org

Opened 15 months ago

Closed 15 months ago

Last modified 3 weeks ago

#8853 closed defect (bug) (fixed)

Bug in filters for 2 entity (class-bp-invitation.php , class-bp-notifications-notification.php)

Reported by: aleey1982's profile aleey1982 Owned by:
Milestone: Priority: low
Severity: minor Version:
Component: (not sure) Keywords: has-patch
Cc:

Description

Version: 2.2.9
Site: http://kluchimasterstva.ru/treningi/

I found a bug in

  • class-bp-invitation.php
  • class-bp-notifications-notification.php

In public static function get( $args = array() ) created an filter for sql query:

$where_sql = self::get_where_sql
...
'user_id'           => $r['user_id'],"
....

Look at "get_where_sql" function, in case if user is not login

if ( ! empty( $args['user_id'] ) ) {

filter by user is not created, and for non unauthorized user loaded data from all users. In my case I got an 120K rows for notifications and 20K extra request for DB in invitation.

It's easy fixed with adding

if (empty($r['user_id'])) return [];

after "self::parse_args( $args );"

In my case page generation down from 3.5 to 1.2, server load down to 40% of current.

Change History (6)

#2 @imath
15 months ago

  • Milestone changed from Awaiting Review to 12.0.0

Hi @aleey1982

Thanks a lot for your report and PR. I’ll look at it asap 👌

#3 @imath
15 months ago

  • Component changed from Core to (not sure)
  • Milestone 12.0.0 deleted
  • Priority changed from high to low
  • Resolution set to fixed
  • Severity changed from major to minor
  • Status changed from new to closed

Hi @aleey1982

I wasn't able to reproduce because the corresponding requests are used when viewing pages restricted to the member displayed.

After looking at your site, I've seen you are not using BuddyPress but a fork of BuddyPress. As a result, I advise you to contact the support team of this fork to have your issue fixed.

https://cldup.com/nL-PwMK3JY.png

We are not responsible for the code of this fork and cannot help you as we have no idea how their code has diverged from ours.

Thanks in advance for your comprehension.

@imath commented on PR #74:


15 months ago
#4

This PR is about a BuddyPress fork, not about the genuine BuddyPress. Please report to the fork's support team.

#5 @aleey1982
15 months ago

I know what I used a fork, but you have the same codebase in files. The bug is present in both BuddyPress and it's fork.

#6 @viktorisaevsh4
3 weeks ago

What steps can be taken to ensure that modifications in a fork of BuddyPress are effectively managed and integrated, especially when addressing shared bugs in both the original BuddyPress and its forks?

Last edited 3 weeks ago by viktorisaevsh4 (previous) (diff)
Note: See TracTickets for help on using tickets.