[wp-trac] [WordPress Trac] #19492: Problems with using wp_insert_term together with switch_to_blog

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 9 23:38:34 UTC 2011

#19492: Problems with using wp_insert_term together with switch_to_blog
 Reporter:  ErikStromme   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  3.2
 Severity:  normal        |   Keywords:
 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?

Ticket URL: <http://core.trac.wordpress.org/ticket/19492>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list