[wp-trac] [WordPress Trac] #49749: Registering rest routes with a slash-prefixed namespace give inconsistent results (was: Bug in WordPress API when I have the prefix wp for the custom endpoint)

WordPress Trac noreply at wordpress.org
Thu Apr 2 16:49:43 UTC 2020


#49749: Registering rest routes with a slash-prefixed namespace give inconsistent
results
-------------------------------------+-----------------------
 Reporter:  skarabeq                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.4.1
Component:  REST API                 |     Version:  5.4
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+-----------------------

Comment (by TimothyBlynJacobs):

 > But I can't understand that because the namespace of route with slash
 and the namespace of the route without slash should be same.

 Yes, as I mentioned earlier, the route is coerced to be the same. But that
 coercion did not apply to the actual namespace value. The change we'll
 make is to apply that coercion to the namespace as well.

 This will be fixed in 5.4.1, but at the moment that doesn't look at least
 a few weeks out.

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


More information about the wp-trac mailing list