Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#58191 new defect (bug)

Preview mode button breaks in custom post types in wordpress 6.2 - manually removing "preview_nonce=" from url fixes it

Reported by: gabez123's profile gabez123 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords: reporter-feedback
Focuses: Cc:



After updating to wordpress 6.2 from wordpress 6.1.1 the Preview mode for my custom post type stopped working.

I have a custom post type which publishes a different type of post. Whenever I click on preview to see the custom post type preview, it adds "preview_nonce=" to the url. This causes the page to be completely blank other than the header and sidebar. When I remove the "preview_nonce=" from the url the preview works perfectly.

I noticed that if I click preview from the list of custom posts rather than from the preview button in the custom post type, it loads perfectly fine without the preview_nonce in the url. Is this a wordpress bug?

Attachments (1)

1b13f0e40e42cda4941eb5f6302cdfe6.gif (237.7 KB) - added by audrasjb 12 months ago.
Can't reproduce the issue

Download all attachments as: .zip

Change History (2)

#1 @audrasjb
12 months ago

  • Component changed from General to Editor
  • Keywords reporter-feedback added
  • Version 6.2 deleted

Hello, welcome to WordPress Core Trac and thank you for opening this ticket.

I wasn't able to reproduce the issue on WordPress 6.2 using a custom post type declared in Twenty Nineteen's functions.php file. Could you please try to reproduce the issue on a fresh WordPress installation (without any plugin)?

12 months ago

Can't reproduce the issue

Note: See TracTickets for help on using tickets.