Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#12206 closed defect (bug) (invalid)

WPMU: Category ID changes when updating a category name

Reported by: williamsba1's profile williamsba1 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.1
Component: General Keywords:
Focuses: Cc:

Description

Running WPMU 2.9.1 and have reproduced this on a fresh install as well as an upgraded site.

If you click EDIT on any category and update the name it will be assigned the next available ID when saved. This happens whether posts are assigned to this category or not.

This was also discussed on the Hackers Mailing list on 1/27

Change History (7)

#1 @donncha
15 years ago

The cat_ID is supposed to update because all categories are global, but it probably shouldn't be incremented by one. It should get a random number above the count of categories in sitecategories.

It updates because another blog on your system may have used that category and cat_ID. It should also update the categories of the affected posts. If it doesn't then that's a bug.

#2 @williamsba1
15 years ago

This is by design? What if you are using is_category('5') in your theme template and then the category ID is updated? Your theme wouldn't work correctly.

I'm a little confused why this would be by design. If I have category with ID 5 how can another blog use that category?

#3 @donncha
15 years ago

An example:

The category "test" on blog 1 will have the same cat_ID as the same category on blog 2. Rename that category to "test2" on one blog, and the other blog will still have a category called test with the old cat_ID.

test2's cat_ID will be different though.

cat_IDs are global across all blogs, makes doing things like sitewide tags much easier!

You can always do is_category( 'test' )

#4 @donncha
15 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Closing, this is how MU works.

#5 @nacin
15 years ago

  • Milestone Unassigned deleted

#6 @Denis-de-Bernardy
15 years ago

doesn't this prevent a term from ever becoming a permalink?

#7 @Denis-de-Bernardy
15 years ago

was meant: without permalinks enabled, that is.

Note: See TracTickets for help on using tickets.