Opened 15 years ago
Closed 15 years ago
#1675 closed defect (bug) (invalid)
Topic pagination gets overriden by sub-forum navigation when used on outer page
| Reported by: | anointed | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Front-end | Version: | 2.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
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)
Note:
See TracTickets
for help on using tickets.
To replicate:
source of archive-forum: (pertinent parts)
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' ); bbp_reset_query_name();Scenario:
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