[wp-trac] [WordPress Trac] #36058: PHP notices and invalid "View Post" link on edit-comments.php when post type does not exist

WordPress Trac noreply at wordpress.org
Thu Mar 3 05:48:32 UTC 2016


#36058: PHP notices and invalid "View Post" link on edit-comments.php when post
type does not exist
----------------------------+-----------------------------
 Reporter:  boonebgorges    |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Comments        |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Steps to reproduce:

 1. Register a custom post type
 2. Create a post
 3. Create a comment on that post
 4. Stop registering the post type
 5. Visit wp-admin/edit-comments.php

 The markup built in `WP_Comments_List_Table::column_response()` for the
 "In Response To" column requires a valid post permalink, as well as the
 post type label corresponding to "View Post". Since permalinks to non-
 existent CPT objects cannot be valid, and since non-existent CPTs don't
 have any post type labels, it seems to me that we can probably bail out of
 this method early if the post type doesn't exist.

 Similarly, `column_date()` probably shouldn't attempt to link to the post
 if the post type doesn't exist.

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


More information about the wp-trac mailing list