Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

#8280 closed defect (bug) (fixed)

BP Nouveau throwing notices on including members-loop.php

Reported by: sbrajesh's profile sbrajesh Owned by: imath's profile imath
Milestone: 6.0.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Templates Keywords: has-patch commit
Cc: sbrajesh

Description

In BP Nouveau template pack, various items loop uses 'bp_nouveau_pagination()' to show the pagination.

The problem with this function is, it checks for specific components and screens. If the fixed list of component is not current component, it throws notice as shown in attached file.

This practically makes it impossible to use the loops outside the specified context of the function.

The proposed solution is to set the default values for $pag_count, $pag_links, $page_arg and if possible allow filtering $pagination_type.

Also, to answer why we need this loop is, we include it to take the advantage by plugins.

Attachments (2)

debug.log.text (15.3 KB) - added by sbrajesh 4 years ago.
Debug log
8280.patch (1.4 KB) - added by imath 4 years ago.

Download all attachments as: .zip

Change History (6)

@sbrajesh
4 years ago

Debug log

@imath
4 years ago

#1 @imath
4 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 6.0.0
  • Version changed from 5.0.0 to 3.0.0

Hi @sbrajesh

Thanks for your feedback. If you can test the attached patch and confirms it's fixing the issue asap, we will be able to include the fix in 6.0.0, otherwise we'll include it in next release.

#2 @sbrajesh
4 years ago

  • Keywords reporter-feedback added

Hi @imath
Thank you for the quick patch. It works great.
I sincerely appreciate it.

#3 @imath
4 years ago

  • Keywords commit added; reporter-feedback removed

Awesome, you're welcome, and thanks for your confirmation. I'll commit it asap.

#4 @imath
4 years ago

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

In 12623:

BP Nouveau: make sure custom components can define their pagination

Introduce a new filter bp_nouveau_pagination_params Plugin Authors can use to customize the pagination of the directory page of their custom component.

Props sbrajesh

Fixes #8280

Note: See TracTickets for help on using tickets.