[wp-trac] Re: [WordPress Trac] #6035: Category to Tag Converter leaves posts without categories

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 18 05:26:47 GMT 2009


#6035: Category to Tag Converter leaves posts without categories
-------------------------------------+--------------------------------------
 Reporter:  westi                    |        Type:  defect (bug)
   Status:  new                      |    Priority:  normal      
Milestone:  2.8                      |   Component:  Import      
  Version:  2.7                      |    Severity:  major       
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------

Comment(by sillybean):

 That part is kind of essential. Otherwise there's no way to make sure each
 post comes out of the cat2tag conversion with at least one category
 attached. You could have a post with several categories, none of them the
 default one, and convert all those categories to tags, leaving the post
 bereft. However, I'm all for a less expensive way of doing it. [[BR]]
 [[BR]]
 Would it be better to do something like:[[BR]][[BR]]

 SELECT wp_term_relationships.object_id FROM wp_term_relationships,
 wp_term_taxonomy WHERE taxonomy = 'category' AND
 wp_term_taxonomy.term_taxonomy_id =
 wp_term_relationships.term_taxonomy_id[[BR]][[BR]]

 to get all the post IDs that have categories, and then set the default
 category on all the other ones?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/6035#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list