[wp-trac] [WordPress Trac] #57973: Can not delete custom template when name contains non-Latin characters

WordPress Trac noreply at wordpress.org
Thu Mar 23 14:23:48 UTC 2023


#57973: Can not delete custom template when name contains non-Latin characters
----------------------------------+-----------------------------
 Reporter:  funway                |      Owner:  (none)
     Type:  defect (bug)          |     Status:  new
 Priority:  normal                |  Milestone:  Awaiting Review
Component:  REST API              |    Version:  6.1.1
 Severity:  normal                |   Keywords:
  Focuses:  javascript, rest-api  |
----------------------------------+-----------------------------
 I can create a custom template whose name contains non-Latin characters.

 But when I delete this template.

 It failed without any message in the front-end.

 I can only find out the error message in the developer tools.

 The ajax post request '/wp/v2/templates/theme_name//template_name' returns
 404.

 I think the problem is caused by the two slashes before none-Latin
 template_name.


 To reproduce:
 1. create a new template with non-Latin characters in post editor.
 2. save the template, re-enter a post editor.
 3. choose the template, and click 'edit template'.
 4. open your browser's developer tools with the network tab.
 5. click 'delete template', then you will see the 404 error in your
 developer tools.

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


More information about the wp-trac mailing list