[wp-trac] [WordPress Trac] #35189: Redirection based on _wp_old_slug postmeta value should first check if there is an active published post with the same slug!

WordPress Trac noreply at wordpress.org
Mon Dec 21 18:54:03 UTC 2015


#35189: Redirection based on _wp_old_slug postmeta value should first check if
there is an active published post with the same slug!
--------------------------+-----------------------------
 Reporter:  gnotaras      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I happened to find a published post (postA) being permanently redirected
 to another post (postB).

 After doing some research I found out that postB had a postmeta key
 {{{_wp_old_slug}}} equal to the slug of postA. When I deleted that
 particular  postmeta key/value from the database, everything returned back
 to normal (no redirection).

 This must have started happening lately (during the last months).

 Shouldn't it be checked whether there is an active published post with a
 slug equal to the value of a {{{_wp_old_slug}}} key before performing the
 actual redirection?

 I really have no clue how this postmeta key had been created there in the
 past. The point is that such a redirection started happening lately and
 that the way it is done without doing any checks could lead to problems.

 Please fix it. Thanks in advance!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35189>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list