[wp-trac] [WordPress Trac] #42238: Notice when Rest Comments controler is checking permision for a non existent post type

WordPress Trac noreply at wordpress.org
Tue Oct 17 11:30:01 UTC 2017


#42238: Notice when Rest Comments controler is checking permision for a non
existent post type
-------------------------------+------------------------------
 Reporter:  dragosh635         |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:  4.8.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by subrataemfluence):

 * keywords:   => reporter-feedback


Comment:

 Hi @dragosh635 welcome to trac and thanks for the ticket.

 Here is how I tried to reproduced your issue:

 '''Step 1:'''
 1. Created a plugin to create a custom post type named "dealers" to
 collect dealer's name, email and phone number
 2. Activated the plugin
 3. Added one record (published)
 4. The endpoint /wp-json/wp/v2/dealers gives desired output with one
 dealer.

 '''Step 2:'''
 1. Deactivated the plugin
 2. Running the same end point again does not give me any result and shows
 me the following message instead:


 {{{
 {"code":"rest_no_route","message":"No route was found matching the URL and
 request method","data":{"status":404}}
 }}}


 which is different from yours.

 I tested with `WP_DEBUG` set to both `true` and `false` separately. Either
 cases the above message stayed the same for me.

 '''Please note, I did not test with Woocommerce as it is a third party
 plugin and preferred to stay with WP core functionality for creating and
 registering above custom post type.
 '''
 If you think I made any mistake in the above process please let me know
 exactly how I can reproduce the issue. However, I would always prefer not
 to use any third party plugin to test WordPress core functionality :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42238#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list