Making WordPress.org

Opened 6 years ago

Closed 6 years ago

#4072 closed defect (bug) (fixed)

Plugin support URLs should 301 to enforce a trailing slash

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by: dd32's profile dd32
Milestone: Priority: lowest
Component: Support Forums Keywords: seo
Cc:

Change History (8)

#1 @jonoaldersonwp
6 years ago

  • Component changed from General to Support Forums

#2 @dd32
6 years ago

  • Keywords reporter-feedback added

@jonoaldersonwp This appears to already happen, are you seeing otherwise?

$ curl -I https://wordpress.org/support/plugin/wp-filebase
HTTP/2 301
server: nginx
date: Tue, 05 Feb 2019 08:35:47 GMT
content-type: text/html; charset=UTF-8
strict-transport-security: max-age=360
x-olaf: ⛄
x-redirect-by: WordPress
location: https://wordpress.org/support/plugin/wp-filebase/

#3 @jonoaldersonwp
6 years ago

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

Odd. Am I going mad?
Closing.

#4 @jonoaldersonwp
6 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#5 @dd32
6 years ago

Huh, weird. is_404() is true for paginated requests..

Ahhh super fun. A request to /support/plugin/* triggers this query in WP_Query.. and as there's only one page of posts on the site.. :)

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR ... ) ORDER BY wp_posts.post_date DESC LIMIT 0, 10

Looks like the Support forum custom views need some logic added to set is_404 = false and prevent the default query from running (since it's built elsewhere somehow)

#6 @dd32
6 years ago

  • Keywords reporter-feedback removed

#7 @jonoaldersonwp
6 years ago

Mwah ha ha, that's a fun one!

#8 @dd32
6 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from reopened to closed

In 8213:

Support Forum: Override WP::handle_404() for Theme/Plugin/Review forum views when a matching plugin/theme is found.

Fixes #4072.

Note: See TracTickets for help on using tickets.