I bumped into my first really annoying WordPress bug today. The function
get_nested_categories(), which is used to display the different categories available in the admin screens, wrongly assumes in 1.2 that people create their parent categories before their children (and that the latter have a higher ID than the former).
This has been fixed in the CVS. However, as there have been changes since 1.2 in CVS, you need to copy the code provided on the bug report page. Take the first function from the “Additional Information” part, and the second one from the “Bug Notes” section.
As I didn’t know about the web-based CVS, I started trying to fix the bug myself. It’s almost finished but doesn’t work yet (just a little bug to track down), and it only uses one MySQL query, whereas the fix presented above can end up using lots, if you have a complicated hierarchical category structure like mine. You’re welcome to have a go at my code — let me know if you find the problem!
Next time I meet a bug, I’ll check in CVS first to make sure it isn’t already half dead.
- Batch Categories 0.9 [en] (2004)
- Batch Category Editing For WordPress [en] (2004)
- Easier TopicExchange Trackbacks for WordPress [en] (2004)
- My Categories are a Mess [en] (2006)
- Tags and Categories are not the Same! [en] (2006)
- Plugin Idea: Weighted Tags by Category [en] (2005)
- The Big 2009 Category Revolution [en] (2009)
- Events in WordPress [en] (2007)
- WordPress.com Still Messes Up Tags and Categories [en] (2010)
- Call to WordPress Plugin Developers [en] (2005)