[wp-trac] [WordPress Trac] #43482: Draft Posts Throw 404 on Preview when Supporting post_format

WordPress Trac noreply at wordpress.org
Wed Mar 7 01:07:04 UTC 2018


#43482: Draft Posts Throw 404 on Preview when Supporting post_format
--------------------------------+-----------------------------
 Reporter:  marklavin           |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Post Formats        |    Version:  4.9.4
 Severity:  normal              |   Keywords:
  Focuses:  ui, administration  |
--------------------------------+-----------------------------
 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.

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


More information about the wp-trac mailing list