Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#39496 new defect (bug)

Can't view page preview.

Reported by: davidmlentz's profile davidmlentz Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7
Component: General Keywords:
Focuses: Cc:

Description

Clicking any Edit link on the list of published pages (wp-admin/edit.php?post_status=publish&post_type=page), and then clicking the Preview Changes button on the edit page, I'm unable to preview the page. Instead I'm presented with the error message "Sorry, you are not allowed to preview drafts."

Expected result: Clicking the Preview Changes button shows me the page, including the WP Admin bar.
Actual result: Clicking the Preview Changes button shows me the error message "Sorry, you are not allowed to preview drafts."

Problem occurs when we use WP Core 4.7. Problem does not occur on WP Core 4.6.

Problem occurs when all plugins are deactivated and uninstalled.

Problem occurs on more than one theme.

Change History (5)

#1 follow-up: @lukecavanagh
8 years ago

@davidmlentz

So the preview changes button does seem to work okay in WP 4.7.

I checked on my local dev version. The version of the page opened with the customizer in the left side of the screen, with the edit element icons showing on the page.

Which default themes did you test with?

#2 in reply to: ↑ 1 @davidmlentz
8 years ago

Replying to lukecavanagh:

@davidmlentz

So the preview changes button does seem to work okay in WP 4.7.

I checked on my local dev version. The version of the page opened with the customizer in the left side of the screen, with the edit element icons showing on the page.

Which default themes did you test with?

Twenty Eleven was the other theme I tried.

Thanks.

dl

#3 follow-up: @lukecavanagh
8 years ago

@davidmlentz

I tested with Twenty Seventeen as the active theme.

#4 in reply to: ↑ 3 @davidmlentz
8 years ago

Replying to lukecavanagh:

@davidmlentz

I tested with Twenty Seventeen as the active theme.

I'm experiencing the same bug when I have the Twenty Seventeen theme active. I see nothing but the "Sorry, you are not allowed to preview drafts" error message in a new tab, where I expect to see my preview.

I hadn't noticed this before, but if I click the Preview Changes button a second time, I do see a preview in the new tab, but it doesn't include the wp-admin-bar.

The view where the error appears has a URL that ends in

?preview_id=12345&preview_nonce=1234567890&_thumbnail_id=-1&preview=true

The view where the actual content appears (sans wp-admin-bar, as if I'm unauthenticated), ends in

?preview=true

#5 @Groff
8 years ago

What worked for me: Deleting the browser's cookies for the site I was working on.

Note: See TracTickets for help on using tickets.