Make WordPress Core

Opened 12 years ago

Closed 9 years ago

#19492 closed defect (bug) (worksforme)

Problems with using wp_insert_term together with switch_to_blog

Reported by: erikstromme's profile ErikStromme Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Taxonomy Keywords: needs-patch needs-unit-tests reporter-feedback close
Focuses: Cc:


I'm running a network of about 80 sites using WP multisite 3.2. I'm experiencing irregularities using switch_to_blog whith wp_insert_term.

To test this I have disabled all plugins, and am testing on a blank page so nothing else interferes. This is the sample code:

wp_insert_term( 'New Term','category');

When run from most blogs it adds the new term to the desired blog and the permalink to the new term page works.

But for a few of the blogs, when it runs it adds the term, but the link to the new term page throws a 404 error. Opening wp-admin and adding any new term through wp-admin fixes it.

Is this related to the other term_cache bugs?

Change History (3)

#1 @wonderboymusic
11 years ago

  • Keywords reporter-feedback needs-patch added

Is this still an issue for you?

#2 @wonderboymusic
10 years ago

  • Keywords needs-unit-tests close added
  • Milestone changed from Awaiting Review to Future Release

ErikStromme, would like to help, but 8 months and no reporter feedback for a ticket that is 2 years old ... will at least need unit tests. Won't close yet...

#3 @wonderboymusic
9 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I said "Won't close yet..." when asking for reporter feedback 17 months ago.

Note: See TracTickets for help on using tickets.