[wp-trac] [WordPress Trac] #52933: Error in browser console when newly published post is previewed a second time

WordPress Trac noreply at wordpress.org
Mon Mar 29 05:11:07 UTC 2021


#52933: Error in browser console when newly published post is previewed a second
time
-------------------------------------------------+-------------------------
 Reporter:  garethhadfield                       |      Owner:  (none)
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  Editor                               |    Version:  5.7
 Severity:  normal                               |   Keywords:
  Focuses:  ui, javascript, administration,      |
  rest-api                                       |
-------------------------------------------------+-------------------------
 Summary of Problem:
 When a new post or page is created then published, then [Preview] |
 [Preview in new tab] is selected, no problem occurs the first time.
 However if [Preview in new tab] is clicked a second time then the the
 console records this error (assuming post id 15):
 Failed to load resource: the server responded with a status of 400 (Bad
 Request) https://example.com/wp-json/wp/v2/posts/15/autosaves?_locale=user

 The error continues to occur every second time [Preview] | [Preview in new
 tab] is clicked.

 I have reproduced this on a fresh install of 5.7 both on local system and
 on hosted web server.

 Steps to Reproduce:
 1) Login and create a new Post by clicking New | Post
 2) Give the post a name and click Publish | Publish | x
 3) Open the browser's javascript console
 4) Click [Preview] | [Preview in new tab]
 5) When the preview window appears, close it or tab back to the edit post
 screen (at this stage no error in console)
 6) Click [Preview] | [Preview in new tab] again (error appears in console)

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


More information about the wp-trac mailing list