[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 08:19:12 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:
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------
Changes (by SergeyBiryukov):

 * component:  Permalinks => Date/Time
 * milestone:  Awaiting Review => 5.3.1


Old description:

> I use a "/%year%/%monthnum%/%day%/%postname%/" permalink for my blog
> posts. I've been doing it this way for many years, though many wordpress
> versions. And I have many blog posts.
>
> After upgrading to WordPress 5.3, clicking on posts in my blog began
> sporadically resulting in 404 errors even though the posts were still
> visible in the wordpress post editor.
>
> I did some research and found the problem was that the day field in the
> links displayed throughout my wordpress site for the permalinks sometimes
> have a shifted day field that varies between two days. When the day in
> the link matches the actual day in the permalink, the page loads
> normally. When the day in the link mismatches, the page gives a 404
> error.
>
> The day shifts occur even in the "view" links within the wordpress editor
> and the permalink display next to the editor.
>
> Here's an actual example from my blog:
>
> https://www.steevithak.com/2018/07/22/ecotopia-by-ernest-callenbach/
>
> https://www.steevithak.com/2018/07/23/ecotopia-by-ernest-callenbach/
>
> The first link is the actual, real permalink where the post lives, has
> always lived, and indexed by Google since the post was created.
>
> The second link was copied-and-pasted from the Wordpress editor permalink
> display for that blog post shortly after I upgraded to WP 5.3. It's also
> the URL WP 5.3 renders as the link to that blog post. It results in a 404
> if you click because the day is wrong.
>
> The day in the links throughout the site seems to shift between 23 and 22
> depending on the time of day. But the post is only able to be loaded when
> the day 22 is used. I'm guessing there's a time zone bug in the code that
> renders the permalinks and when midnight occurs in WP5.3 time relative to
> midnight in the user's actual zone causes the day to shift.
>
> I've found the easiest way to spot the issue is on the WP admin "All
> Posts" page. The day number in the "view" link under each post title will
> exhibit the day shifting problem, while the "Date" value on the far right
> shows the actual post day. So for the post above, the "Date" field always
> says day 22. But the day number in the "view" link will be 23 sometimes.

New description:

 I use a "/%year%/%monthnum%/%day%/%postname%/" permalink for my blog
 posts. I've been doing it this way for many years, though many wordpress
 versions. And I have many blog posts.

 After upgrading to WordPress 5.3, clicking on posts in my blog began
 sporadically resulting in 404 errors even though the posts were still
 visible in the wordpress post editor.

 I did some research and found the problem was that the day field in the
 links displayed throughout my wordpress site for the permalinks sometimes
 have a shifted day field that varies between two days. When the day in the
 link matches the actual day in the permalink, the page loads normally.
 When the day in the link mismatches, the page gives a 404 error.

 The day shifts occur even in the "view" links within the wordpress editor
 and the permalink display next to the editor.

 Here's an actual example from my blog:

 https://www.steevithak.com/2018/07/22/ecotopia-by-ernest-callenbach/

 https://www.steevithak.com/2018/07/23/ecotopia-by-ernest-callenbach/

 The first link is the actual, real permalink where the post lives, has
 always lived, and indexed by Google since the post was created.

 The second link was copied-and-pasted from the WordPress editor permalink
 display for that blog post shortly after I upgraded to WP 5.3. It's also
 the URL WP 5.3 renders as the link to that blog post. It results in a 404
 if you click because the day is wrong.

 The day in the links throughout the site seems to shift between 23 and 22
 depending on the time of day. But the post is only able to be loaded when
 the day 22 is used. I'm guessing there's a time zone bug in the code that
 renders the permalinks and when midnight occurs in WP5.3 time relative to
 midnight in the user's actual zone causes the day to shift.

 I've found the easiest way to spot the issue is on the WP admin "All
 Posts" page. The day number in the "view" link under each post title will
 exhibit the day shifting problem, while the "Date" value on the far right
 shows the actual post day. So for the post above, the "Date" field always
 says day 22. But the day number in the "view" link will be 23 sometimes.

--

Comment:

 Related: #48625

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


More information about the wp-trac mailing list