[wp-trac] [WordPress Trac] #15397: redirect_guess_404_permalink() doesn't guess posts with updated dates

WordPress Trac noreply at wordpress.org
Tue Feb 6 01:06:21 UTC 2018


#15397: redirect_guess_404_permalink() doesn't guess posts with updated dates
--------------------------------------------------+---------------------
 Reporter:  archon810                             |       Owner:  pento
     Type:  enhancement                           |      Status:  closed
 Priority:  normal                                |   Milestone:  4.9.3
Component:  Canonical                             |     Version:
 Severity:  normal                                |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests fixed-major  |     Focuses:
--------------------------------------------------+---------------------

Comment (by archon810):

 Replying to [comment:32 dd32]:
 > Replying to [comment:31 archon810]:
 > > Warning: Looks like the fix is not retroactive so I'll have to keep my
 redirect function in indefinitely.
 >
 > Correct, you can also migrate it to store the data the same way core
 does, to avoid having to run your own variant indefinately.
 >
 > If you look at the above commits, you'll find it stores the data in
 `_wp_old_date`. I'd suggest inspecting an actual install though.

 The problem is our solution doesn't keep track of dates either, it just
 detects 404s and attempts to check if the slug is valid for a post, then
 finds the right date. So I can change the dates all day long, and they'll
 all still redirect correctly.

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


More information about the wp-trac mailing list