[wp-trac] [WordPress Trac] #35031: wp_old_slug_redirect() in 4.4 redirecting existing posts

WordPress Trac noreply at wordpress.org
Wed Dec 23 03:14:35 UTC 2015


#35031: wp_old_slug_redirect() in 4.4 redirecting existing posts
-------------------------------------------------+-------------------------
 Reporter:  douglsmith                           |       Owner:  pento
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.4.1
Component:  Query                                |     Version:  4.4
 Severity:  critical                             |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-    |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by pento):

 I don't think that checking `$wp_query->post_count` is the correct
 solution. There are cases in `WP::handle_404()` where `$wp_query->posts`
 (and by extension, `$wp_query->post_count`) can be set, but it will still
 return a 404. I don't really want to just copy the tests from
 `WP::handle_404()`, because they could change in the future.

 I think [attachment:35031.2.diff] is close. @bobbingwide, you mentioned
 that it doesn't fix the bug in some situations with WPML - could you
 please provide steps to reproduce this?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35031#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list