Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33541 closed defect (bug) (fixed)

"View Page" button takes to 404 when page is set to "Pending Review"

Reported by: wpdev101's profile wpdev101 Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

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 ) {

Attachments (2)

post.php (54.1 KB) - added by wpdev101 9 years ago.
wp-admin/includes/post.php
33541.patch (634 bytes) - added by wpdev101 9 years ago.

Download all attachments as: .zip

Change History (6)

@wpdev101
9 years ago

wp-admin/includes/post.php

#1 in reply to: ↑ description @wpdev101
9 years ago

I am new to submitting bug fixes so I apologize if I did something wrong ( seems I did with the file update, it's not showing changed line ). I'll learn more about it.

@wpdev101
9 years ago

#2 @wpdev101
9 years ago

  • Keywords has-patch added

#3 @wonderboymusic
9 years ago

  • Milestone changed from Awaiting Review to 4.4

#4 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34324:

Edit Post: When a post is "Pending Review", the "View Post" link should behave like ot does for drafts and generate a preview link.

Props wpdev101.
Fixes #33541.

Note: See TracTickets for help on using tickets.