Skip to:

Opened 12 years ago

Closed 11 years ago

#1675 closed defect (bug) (invalid)

Topic pagination gets overriden by sub-forum navigation when used on outer page

Reported by: anointed's profile anointed Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Front-end Keywords:


When adding a custom topic-loop to the homepage which includes calls to the pagination for topics there is a problem.

The pagination links point to the sub-forum or the $base of whatever page which the loop is being displayed on.

Change History (4)

#1 @johnjamesjacoby
12 years ago

  • Milestone changed from Awaiting Review to 2.1

#2 @anointed
12 years ago

To replicate:

  1. Create a few top level forums and a few nested sub-forums for each forum
  2. archive-forum.php template:
<?php bbp_get_template_part( 'bbpress/content', 'archive-forum' ); ?>
<?php bbp_get_template_part( 'bbpress/loop', 'topics-custom' ); ?>

source of archive-forum: (pertinent parts)

<?php while ( bbp_forums() ) : bbp_the_forum(); ?>

source of topics-custom:

		// Query defaults
		$topics_query = array(
			'author'         => 0,
			'show_stickies'  => false,
			'parent_forum'   => 'any',
			'posts_per_page' => 5,
			'order'          => 'DESC',

		bbp_set_query_name( 'bbp_topic_archive' );

		// Before topics index
		do_action( 'bbp_template_before_topics_index' );

		// Load the topic index
		if ( bbp_has_topics( $topics_query ) ) {
			bbp_get_template_part( 'bbpress/pagination', 'topics'    );
			bbp_get_template_part( 'bbpress/loop',       'topics'    );
			bbp_get_template_part( 'bbpress/pagination', 'topics'    );

		// No topics
		} else {
			bbp_get_template_part( 'bbpress/feedback',   'no-topics' );

		// After topics index
		do_action( 'bbp_template_after_topics_index' );


When on the archive-forum page, i.e. the top level /forums/ you will see a listing of the forums and subforums table followed by a topics table.

On this page if you click page 2 of the topics, everything is fine.

Now, click on a sub-forum so /forums/sub-forum/ url

You will see a table of the sub-forums followed by a table of topics.

Click on page 2x of the topics and you will be taken to a page showing the same sub-forums but also have a message 'oh bother no topics found here'.

It should be showing page 2 of the topics.

*Of course the way the system works, if it is fixed, you are going to end up seeing the 2nd level forums followed by the page 2 of topics, would be nice to only show page 2 of topics if possible

Last edited 12 years ago by anointed (previous) (diff)

#3 @johnjamesjacoby
11 years ago

I'm not able to duplicate this on latest plugin branch. I don't recall doing anything specific to fix it, so it's possible the shortcode theme compat changes fixed it on accident.

#4 @anointed
11 years ago

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

closing ticket. I'm not sure what I did to change this, but it is now working for me.

Note: See TracTickets for help on using tickets.