WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 months ago

#16230 new defect (bug)

Category slugs not cut at 200 characters as it should under some conditions

Reported by: paolal Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.1
Component: Taxonomy Keywords: needs-patch
Focuses: Cc:

Description

When a category name is longer than 200 characters, it is cut to 200 and so is the slug automatically created upon category creation.

Now, if you edit the category name or slug afterwards, again trying to set a name longer than 200 characters it is cut again.

But, if you edit the name or slug and use a very long string like this one:

%d1%85%d1%80%d0%b0%d0%bd%d0%b0/%d1%80%d0%b5%d1%86%d0%b5%d0%bf%d1%82%d0%b8/%d0%b4%d0%b5%d1%81%d0%b5%d1%80%d1%82%d0%b8-%d1%80%d0%b5%d1%86%d0%b5%d0%bf%d1%82%d0%b8-%d1%85%d1%80%d0%b0%d0%bd%d0%b0/%d1%81%d0%bb%d0%b0%d0%b4%d0%ba%d0%b8%d1%88%d0%b8-%d0%b4%d0%b5%d1%81%d0%b5%d1%80%d1%82%d0%b8-%d1%80%d0%b5%d1%86%d0%b5%d0%bf%d1%82%d0%b8-%d1%85%d1%80%d0%b0%d0%bd%d0%b0-%d1%80%d0%b5%d1%86%d0%b5%d0%bf%d1%/

Then the slug ends up being longer than the 200 chars limit.

Now if on the Categories list dashboard page you have more categories than visible on one page, and the category you edited above is not on page 1, the page it is on will appear empty (while successive pages will be all right if they contain regular categories)

This has been reproduced on 3.1-RC2-17283

Change History (4)

comment:1 SergeyBiryukov3 years ago

A question aside: do we actually need to store slugs in urlencoded form? It only allows 33 chars for non-English slugs, which is noticeably less than the original 200 characters limit.

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

comment:2 markjaquith3 years ago

  • Milestone changed from Awaiting Review to Future Release

comment:3 SergeyBiryukov3 years ago

  • Keywords needs-patch added; category slug removed

Related: #10483

comment:4 nacin3 months ago

  • Component changed from General to Taxonomy
Note: See TracTickets for help on using tickets.