[wp-trac] [WordPress Trac] #33541: "View Page" button takes to 404 when page is set to "Pending Review"

WordPress Trac noreply at wordpress.org
Tue Aug 25 15:33:29 UTC 2015


#33541: "View Page" button takes to 404 when page is set to "Pending Review"
----------------------------+-----------------------------
 Reporter:  wpdev101        |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  4.3
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 This happens only when permalinks are turned on ( not set to Default ).

 Steps to reproduce:

 1. Add new page
 2. Set status to "Pending Review"
 3. Click "Save as Pending"
 4. Click the "View Page" below the title input

 The "View Page" button below the title input has a regular URL ( as it was
 published ) instead of the preview URL, so it leads to a 404 page.

 The issue happens for posts as well, not just pages.

 The suggested fix is in get_sample_permalink_html function ( wp-
 admin/includes/post.php ) by changing:


 {{{
 if( 'draft' == $post->post_status ) {
 }}}

 to


 {{{
 if( 'draft' == $post->post_status || 'pending' == $post->post_status ) {
 }}}

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


More information about the wp-trac mailing list