Make WordPress Core

Opened 13 years ago

Last modified 5 years ago

#16230 new defect (bug)

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

Reported by: paolal's profile paolal Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Taxonomy Keywords: needs-patch needs-testing
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 (5)

#1 @SergeyBiryukov
13 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 13 years ago by SergeyBiryukov (previous) (diff)

#2 @markjaquith
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#3 @SergeyBiryukov
13 years ago

  • Keywords needs-patch added; category slug removed

Related: #10483

#4 @nacin
10 years ago

  • Component changed from General to Taxonomy

#5 @chriscct7
9 years ago

  • Keywords needs-testing added

Seems to still be a bug on 4.3.1

Note: See TracTickets for help on using tickets.