[wp-trac] [WordPress Trac] #9848: Using custom taxonomies breaks permalinks created by the_tags

WordPress Trac wp-trac at lists.automattic.com
Sun May 17 06:04:25 GMT 2009


#9848: Using custom taxonomies breaks permalinks created by the_tags
--------------------------+-------------------------------------------------
 Reporter:  markel        |       Owner:  filosofo                                         
     Type:  defect (bug)  |      Status:  new                                              
 Priority:  normal        |   Milestone:  Unassigned                                       
Component:  Taxonomy      |     Version:  2.8                                              
 Severity:  critical      |    Keywords:  taxonomy,custom,tags,template,permalinks,the_tags
--------------------------+-------------------------------------------------
 Using instructions [http://justintadlock.com/archives/2009/05/06/custom-
 taxonomies-in-wordpress-28 found here] I created a small plugin file to
 add a custom taxonomy to a 2.8b1 installation. The code was:

 {{{
 add_action( 'init', 'create_my_taxonomies', 1 );

 function create_my_taxonomies() {
         register_taxonomy( 'guest', 'post', array( 'hierarchical' =>
 false, 'label' => 'Guests', 'query_var' => true, 'rewrite' => true ) );
 }}}

 After activating this, I created a post with four taxonomy terms under the
 new {{{guest}}} taxonomy type. I also gave the post a handful of standard
 {{{post_tag}}} taxonomy terms and one {{{category}}}.

 When the post is displayed in the default theme (or any theme, for that
 matter), {{{the_tags}}} generates the list of {{{post_tag}}} terms, but
 the permalinks they point to have the new {{{/guest/}}} taxonomy string
 rather than the {{{/tag/}}} string they should have.

 e.g. the Post Tag "whatever" is now generating

 {{{http://yourblog.com/guest/whatever/}}}

 rather than

 {{{http://yourblog.com/tag/whatever/}}}

 All the post tags added to the post are showing (correctly) in the
 term_taxonomy database table as {{{post_tag}}} entries and not {{{guest}}}
 entries.

 Deactivating the custom taxonomy plugin does not return the generated
 links to normal. It is also broken in any new post, even a new post
 created without any of the custom taxonomy terms.

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


More information about the wp-trac mailing list