[wp-trac] [WordPress Trac] #35012: wp_old_slug_redirect can cause redirect loop

WordPress Trac noreply at wordpress.org
Fri Dec 11 17:48:27 UTC 2015


#35012: wp_old_slug_redirect can cause redirect loop
------------------------------------------------+--------------------
 Reporter:  vdwijngaert                         |       Owner:
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  4.4.1
Component:  Canonical                           |     Version:  4.4
 Severity:  normal                              |  Resolution:
 Keywords:  dev-feedback has-patch 2nd-opinion  |     Focuses:
------------------------------------------------+--------------------
Changes (by vdwijngaert):

 * keywords:   => dev-feedback has-patch 2nd-opinion


Comment:

 I added a patch, it checks whether the $link equals get_post_permalink()
 to detect the most simple redirect loop: redirecting to the same URL. I'm
 not sure if get_post_permalink is the best way to get the current URL, but
 it seems to suit the needs here. Feedback is welcome!

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


More information about the wp-trac mailing list