[wp-trac] [WordPress Trac] #32944: 404 Not Found when sending POST request with a param with the same name of a custom post type

WordPress Trac noreply at wordpress.org
Thu Jul 9 15:52:54 UTC 2015


#32944: 404 Not Found when sending POST request with a param with the same name of
a custom post type
-------------------------------+-----------------------------
 Reporter:  Filozofer          |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.2.2
 Severity:  normal             |   Keywords:
  Focuses:  administration     |
-------------------------------+-----------------------------
 Hello,

 '''Description:'''
 - On any wordpress install v4.2.2
 - if there's a custom post type register
 - and if a POST request to any page of the website is sent with a
 parameter which have the same name of a register custom post type
 - THEN a 404 http code is return

 '''Step to reproduce:'''
 - Download last version of wordpress on https://fr.wordpress.org/txt-
 download/
 - Install the wordpress by browsing to the url
 - Add this line to the end of the functions.php file of the default theme
 twentyfifteen:
 {{{
 register_post_type('example');
 }}}
 - Send a POST request to any page of the website with the following post
 parameter:
 'example' => 'something'
 - You will receive a 404 page in return

 Note: You can use this chrome app to send post request if needed:
 https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop

 '''Why/How I found this ?'''

 I was trying to create a form on one page of the website I'm currently
 working on and after adding a new field to the form, each time I submit
 the form I was facing a 404 rather than my submit page.
 After multiple tests I found than if I change the name of my new field it
 work again.

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


More information about the wp-trac mailing list