Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5117 closed defect (bug) (fixed)

Group meta_query notice error

Reported by: imath's profile imath Owned by: boonebgorges's profile boonebgorges
Milestone: 1.8.1 Priority: normal
Severity: trivial Version: 1.8
Component: Groups Keywords:
Cc:

Description

Hi,

I'm discovering meta_query for Activities and Groups. Very interesting.

In bp-groups-classes, i've noticed that there might be a line that shouldn't be there : at line 384, $total_sql['select'] doesn't seem to be set and it's concatenated with a value that doesn't seems to exist ($meta_query_sql['join_total']) as $meta_query_sql seems to have only two keys ('join' & 'where').

_

i'm sorry to ask but, the meta_query parameter only accepts one meta_key query, isn't it ? i've tried to add some OR/AND relations on 2 meta_keys and the results are strange for activities (duplicates if an activity has the two meta_keys) and i got a sql error in groups (unknown column mt1.group_id)

Change History (5)

#1 @boonebgorges
11 years ago

i'm sorry to ask but, the meta_query parameter only accepts one meta_key query, isn't it ? i've tried to add some OR/AND relations on 2 meta_keys and the results are strange for activities (duplicates if an activity has the two meta_keys) and i got a sql error in groups (unknown column mt1.group_id)

It should act just like meta_query in WP_Query, as it's using the same code to concatenate metadata queries. If you're finding bugs in the activity component, could you please open a separate ticket with detailed instructions on how to reproduce?

#2 follow-up: @boonebgorges
11 years ago

  • Milestone changed from Awaiting Review to 1.8.1

I've confirmed that the line in question should not be there. It was a remnant of a problem that was fixed by the block starting around line 468. Thanks for the catch, imath.

#3 @boonebgorges
11 years ago

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

In 7314:

Removes incorrect line from BP_Groups_Group::get()

In a previous attempt to fix a bug, this line had been introduced into
the meta_query parsing section of BP_Groups_Group::get(). Its
unintended presence causes PHP notices, and is generally not very cool.

Fixes #5117

Props imath

#4 @boonebgorges
11 years ago

In 7315:

Removes incorrect line from BP_Groups_Group::get()

In a previous attempt to fix a bug, this line had been introduced into
the meta_query parsing section of BP_Groups_Group::get(). Its
unintended presence causes PHP notices, and is generally not very cool.

Fixes #5117

Props imath

#5 in reply to: ↑ 2 @imath
11 years ago

Replying to boonebgorges:

Thanks for the catch, imath.

You're welcome Boone, i'm creating 2 other tickets with a detailed explanation about the meta_query in activities & groups.

Note: See TracTickets for help on using tickets.