Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 8 years ago

#4096 closed defect (bug) (no action required)

bp_ajax_querystring bug with include, exclude

Reported by: chochal's profile chochal Owned by:
Milestone: Priority: normal
Severity: major Version: 1.5.4
Component: Activity Keywords: needs-patch
Cc:

Description

When filtering bp_ajax_querystring for bp_has_activities with either the "include" or "exclude" parameter, clicking the "load more" button will just load the "page 1" activities again, it won't load what are supposed to be the "page 2,3,etc" contents on the ajax stream.

If ajax is not used and the non-ajax pagination is used instead, then everything works, "include" and "exclude" with bp_has_activities will display all the pages correctly.

Change History (4)

#1 @chochal
12 years ago

Error was on my part, please disregard.

#2 @boonebgorges
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Disregarded :)

#3 @navichawla92
8 years ago

  • Milestone set to 2.6
  • Resolution invalid deleted
  • Status changed from closed to reopened

As i am working with this like
i pass the id in string as include=23,24,136,2,27,26,25,138,30,125,31,32,33,29,28,36,132,34,42,42,38,37,46,45,44,43,48,47,49,50,51,53,52,118,55,54,57,58,120,60,119,61,62,63,65,124,64,68,67,69,70,71,72,74,73,75,77,76,78,80,79,81,82,83,84,133,126,85,86,89,88,90,87,122,92,93,94,95,96,98,97,134,99,123,101,102,103,104,105,106,107,117,135,109,108,115,111,110,112,113,114,127,137,39,116,40,41,21,35,22,128;
but it load the profile of the user with 136 id first but i want the user in same way i pass the user id.please help me if have any refernrce thanks

#4 @boonebgorges
8 years ago

  • Milestone 2.6 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

@navichawla92 - What was originally reported here was a (purported) bug related to pagination. What you're requesting is not really related to the current ticket: a way to order results based on the order of the include IDs passed.

This sounds to me like it's too specialized a sort-order to include in BuddyPress itself, but you should be able to modify the sort order in any way you'd like using the bp_activity_paged_activity_sql filter. I'm not 100% sure I understand what you're trying to accomplish - it sounds to me like you are confusing include (which refers to activity IDs) with user_id (which refers to user IDs). But, as an example, you can sort according to the include param by modifying the MySQL query so that it looks like this:

SELECT ... WHERE ... ORDER BY FIELD(id, 23, 24, 136, 2, 27 ...)

You can change id to user_id if you want to sort by user ID instead.

Good luck!

Note: See TracTickets for help on using tickets.