Make WordPress Core

Opened 7 years ago

Last modified 6 weeks ago

#43482 new defect (bug)

Draft Posts Throw 404 on Preview when Supporting post_format

Reported by: marklavin's profile marklavin Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.4
Component: Post Formats Keywords: reporter-feedback
Focuses: ui, administration Cc:

Description (last modified by sabernhardt)

A client is reporting that they're not able to preview drafts of some of the custom post types we have running on their site. The issue is not occurring for all post types on their site. I believe I've traced the issue to the fact that the errant post types support "post_format."

The preview URL that gets generated when I preview the "ask-the-expert" post is:

https://www.sitename.com/?post_type=ask-the-expert&p=4063&preview_id=4063&preview_nonce=ebffa07dd9&post_format=standard&_thumbnail_id=-1

That above URL throws a 404 page.

When I pull out the 'post_format=standard' part of the query, so that the URL looks like:

https://www.sitename.com/?post_type=ask-the-expert&p=4063&preview_id=4063&preview_nonce=ebffa07dd9&_thumbnail_id=-1

then the preview loads correctly.

Interestingly, just for giggles I also tried:

https://www.sitename.com/?post_type=ask-the-expert&p=4063&preview_id=4063&preview_nonce=ebffa07dd9&_post_format=standard&_thumbnail_id=-1

and that also worked as it should. (notice the added underscore before 'post_format')

For now I think I'm just going to disable post formats for the offending post types, but methinks I found a bug.

Change History (1)

#1 @sabernhardt
6 weeks ago

  • Description modified (diff)
  • Keywords reporter-feedback added

Thanks for the report and sorry for the very long delay.

The preview URL looks as though it comes from a plugin that creates publicly available post previews. Would you know whether that is accurate (and/or which plugin)?

Note: See TracTickets for help on using tickets.