[wp-trac] [WordPress Trac] #48623: WP 5.3 time problem causes day number shifts in permalinks
WordPress Trac
noreply at wordpress.org
Thu Nov 14 19:57:52 UTC 2019
#48623: WP 5.3 time problem causes day number shifts in permalinks
--------------------------+---------------------
Reporter: steevithak | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3.1
Component: Date/Time | Version: 5.3
Severity: major | Resolution:
Keywords: | Focuses:
--------------------------+---------------------
Comment (by steevithak):
I can now confirm that swapping gmdate() back to date() at line 215 in
link-template.php fixes all the 404s due to the off-by-one-day problem in
the blog post links.
I'll defer to you guys whether the change from date() to gmdate() was
correct in this part of the code, but if it is correct, then what's
missing may be a corresponding fix for all the existing permalinks on old
posts that were created with the old code. My only worry is that if you
change the actual post permalinks, it will cause breakage out on the
Internet with search engines and other sites now linking to a permalink
that turned out to be a "temporarylink" :) As it stands now, users coming
in from Google searches or links on other sites are still getting to my
posts correctly. It's only users clicking on internal links created within
WordPress by dynamic calls to get_permalink() that are wrong and lead to
404s.
I've got one clue that might offer a solution though. Whatever method you
use to calculate the date in Admin -> All Posts, still shows the correct
day. So it's clearly using some other method than get_permalink() is and
it's still producing consistent dates for me. So maybe get_permalink()
needs to use whatever method that is (I haven't tracked down the code that
generates that field but may do that tonight if I have time).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48623#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list