id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses
22102,Tags list not displaying programmatically added child tags,capcar,,"Greetings,
I have an obscure problem in the admin area that may be a bug. I am migrating a site to WordPress, and am creating a number of hierarchical taxonomies programmatically using the wp_insert_term() function. An example:
Parent 1
---child 1
---child 2
Parent 2
---child 3
---child 4
Parent 3
---child 5
---child 6
I am importing these all at once via code on a hidden page. The tags are all being imported correctly, because they are in the database, they are showing up on the ""Edit Post"" page in their appropriate panel (properly hierarchical), they can be searched for in the tag admin list, and the admin lists the correct number of tags - in this example 9.
HOWEVER, when I go to the admin tag list, this is the only thing that shows:
Parent 1
---child 1
---child 2
Parent 2
Parent 3
..and yet the the admin lists 9 tags as being in the system. Troubleshooting this, I discovered that if import the children tags separately and REFRESH THE TAG LIST between each import, then the list will show up correctly.
Here's another twist: If I import enough tags to span multiple admin pages (i.e. page 1 of 10), and the last 5 pages are children tags of, in this example, Parent 3... then Wordpress will display 5 empty pages for the list of tags. It clearly knows how many pages are needed for the tags, but it is not displaying them.
I have tested this with the default categories as well as custom taxonomies (hierarchical), and can recreate the problem over and over. This leads me to believe that there is a bug in how WordPress refreshes the tag list - clearly it is not generating this list directly from the database, because those tags are there. Is this list being cached somewhere?
Obscure problem, I know, but hopefully this might ring a bell with someone.",defect (bug),closed,normal,,Administration,3.4.2,normal,duplicate,,,