[wp-trac] [WordPress Trac] #54521: Taxonomy term quick edit does not save if taxonomy has non latin characters

WordPress Trac noreply at wordpress.org
Mon Dec 20 16:52:18 UTC 2021

#54521: Taxonomy term quick edit does not save if taxonomy has non latin characters
 Reporter:  panagiotis.synetos  |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  6.0
Component:  Taxonomy            |     Version:  5.8.2
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  administration

Comment (by panagiotis.synetos):

 Fixing one thing, causes another to break @SergeyBiryukov , which I found
 while writing the Unit Test.

 I'll try and come back with more info before the end of the week if
 needed, but long story short

 Inside class WP_Screen https://github.com/WordPress/wordpress-
 develop/blob/trunk/src/wp-admin/includes/class-wp-screen.php#L250 there is
 a sanitize happening on the ID (which on our case, it's the taxonomy slug)

 Sanitizing something that is called `wp_ελληνικό_tax` gets converted to
 `wp__tax` and hell breaks loose down the line,
 admin/includes/class-wp-terms-list-table.php#L572 , as
 `$this->screen->taxonomy` is empty, same for the `post_type` , ending up
 with this notice

 (I just run `phpunit --group ajax --filter Tests_Ajax_QuickEdit` so I
 don't have to wait for the whole suite to run when `npm run test:php` )

 ..E                                                                 3 / 3

 Time: 00:01.547, Memory: 172.50 MB

 There was 1 error:

 1) Tests_Ajax_QuickEdit::test_term_quick_edit_non_latin_slug
 Trying to get property 'show_ui' of non-object



 I've commit the unit tests, demonstrating that everything works fine with
 taxonomies with latin characters and that it fails with non-

 Any suggestions on how to move forward?

 Thanks and have a good one

Ticket URL: <https://core.trac.wordpress.org/ticket/54521#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list