[wp-trac] [WordPress Trac] #16230: Category slugs not cut at 200 characters as it should under some conditions

WordPress Trac noreply at wordpress.org
Fri Jan 23 18:57:37 UTC 2026


#16230: Category slugs not cut at 200 characters as it should under some conditions
---------------------------------------+---------------------
 Reporter:  paolal                     |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:
Component:  Taxonomy                   |     Version:  3.1
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-refresh  |     Focuses:
---------------------------------------+---------------------
Changes (by huzaifaalmesbah):

 * keywords:  needs-patch needs-testing => needs-patch needs-refresh


Comment:

 == Patch Testing Report

 Patch Tested:
 https://core.trac.wordpress.org/attachment/ticket/16230/16230-Category-
 slug-length-fix.diff

 === Environment
 - WordPress: 7.0-alpha-61215-src
 - PHP: 8.2.29
 - Server: nginx/1.29.4
 - Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 143.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Two 2.1
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.1

 === Steps taken

 1. Created multiple categories to ensure pagination in the Categories
 admin screen.
 2. Created a new category with a normal name.
 3. Edited the category slug and pasted a very long non-English string.
 4. Repeated the test using a very long URL-encoded string containing
 multiple path segments.
 5. Observed the saved slug length in the database and in the admin UI.
 6. Navigated to the Categories list page and paginated to the page
 containing the edited category.
 7. Applied the patch and repeated all steps.

 8. ❌ Patch is failing

 === Expected result
 - Category slugs should be truncated to a maximum of 200 characters
 regardless of input type.
 - Long non-English and URL-encoded slug values should not bypass the
 length limit.
 - The Categories admin list should not render empty pages when paginating.

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


More information about the wp-trac mailing list