Making WordPress.org

Opened 8 years ago

Closed 6 years ago

Last modified 4 years ago

#2532 closed defect (bug) (fixed)

Forums: "Most popular topics" view is broken

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: netweb's profile netweb
Milestone: Q1 Priority: normal
Component: Support Forums Keywords:
Cc:

Description

https://wordpress.org/support/view/popular/ appears to be broken: it's supposed to display the list of the most commented topics, but at the moment it just displays the first page of the "All Topics" view.

Works as expected on https://ru.wordpress.org/support/view/popular/ though, so I guess it might be a result of performance optimizations specific to the English forums.

Change History (12)

#1 @SergeyBiryukov
8 years ago

Caused by these two lines, introduced in [3903].

  • Would it be possible to remove $r['orderby'] = 'ID'; for "Most popular topics" view?
  • Is it necessary for this view to be limited to the last six months?

The first item should make the view at least somewhat accurate.

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

#2 follow-up: @ocean90
8 years ago

Can you provide the SQL query which bbPress would perform?

#3 in reply to: ↑ 2 @SergeyBiryukov
8 years ago

Replying to ocean90:

Can you provide the SQL query which bbPress would perform?

Currently:

SELECT SQL_CALC_FOUND_ROWS wporg_419_posts.ID FROM wporg_419_posts INNER JOIN wporg_419_postmeta ON ( wporg_419_posts.ID = wporg_419_postmeta.post_id ) WHERE 1=1 AND wporg_419_posts.post_parent NOT IN (21261,21262,21272) AND ( 
wporg_419_postmeta.meta_key = '_bbp_reply_count'
) AND wporg_419_posts.post_type = 'topic' AND (wporg_419_posts.post_status = 'publish' OR wporg_419_posts.post_status = 'closed' OR wporg_419_posts.post_status = 'private' OR wporg_419_posts.post_status = 'hidden') AND ( wporg_419_posts.ID >= 1 ) GROUP BY wporg_419_posts.ID ORDER BY wporg_419_posts.ID DESC LIMIT 0, 15

With those lines removed:

SELECT SQL_CALC_FOUND_ROWS wporg_419_posts.ID FROM wporg_419_posts INNER JOIN wporg_419_postmeta ON ( wporg_419_posts.ID = wporg_419_postmeta.post_id ) WHERE 1=1 AND wporg_419_posts.post_parent NOT IN (21261,21262,21272) AND ( 
wporg_419_postmeta.meta_key = '_bbp_reply_count'
) AND wporg_419_posts.post_type = 'topic' AND (wporg_419_posts.post_status = 'publish' OR wporg_419_posts.post_status = 'closed' OR wporg_419_posts.post_status = 'private' OR wporg_419_posts.post_status = 'hidden') GROUP BY wporg_419_posts.ID ORDER BY wporg_419_postmeta.meta_value+0 DESC LIMIT 0, 15

The query is also performed twice, as bbp_view_query() is called twice during the page load, I wonder if we could get rid of the second query (haven't looked closely yet).

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #forums by sterndata. View the logs.


8 years ago

This ticket was mentioned in Slack in #forums by clorith. View the logs.


7 years ago

#6 @Clorith
7 years ago

There's no real value in this view, beyond confidence boosts for individuals, so let's just make away with it on the international forums altogether.

#7 @netweb
7 years ago

  • Owner set to netweb
  • Status changed from new to accepted

#8 @tellyworth
6 years ago

#4045 was marked as a duplicate.

#9 @tellyworth
6 years ago

  • Milestone set to Q1

#10 @dd32
6 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 8082:

Forums: Remove the 'Popular' view as it wasn't operational and doesn't make sense to enable from a performance perspective.

Fixes #2532.

#11 @dd32
4 years ago

  • Milestone changed from Q1 to 2020 Q1

Milestone renamed

#12 @dd32
4 years ago

  • Milestone changed from 2020 Q1 to Q1

Milestone renamed

Note: See TracTickets for help on using tickets.