Many Eyes, Bugs Being Shallow, All That

WordPress 2.5.1 added a really powerful feature to register_taxonomy(): automatic registration of permalinks and query vars to match the taxonomy. Well, theoretically it added that feature. It wasn’t working in practice. After some searching yesterday and today, I finally found the bug and worked up a fix. I made a diff and set off to open a ticket in Trac.

On the one hand I’m glad I searched first, because it turns out that a ticket on the very same issue was opened on May 16th and it already has a fix. On the other hand, it’s kind of a kicker to have lost my chance at reporting the bug and submitting a fix by only a few days.

The fix is committed for WordPress 2.6, but I’ve done a workaround for 2.5.1 (workarounds are easier to manage than core code changes). I’d say I wish I searched Trac first, but I wouldn’t have known what to search for if I didn’t figure out how to fix the bug first. And I guess I really can’t complain about a community that quickly finds and fixes bugs.

3 Comments

  1. So, what’s the workaround? :) Or did you just access the db directly?

  2. @Jason DeVelvis:

    Sorry, I should have included that.

    In addition to $taxonomy and $object_type, register_taxonomy() now also accepts an array of args. The defaults are as follows:

    array('hierarchical' => false, 'update_count_callback' => '', 'rewrite' => true, 'query_var' => true)

    The bug only shows itself if you use the defaults and don’t submit your own args. My work around was to call register_taxonomy() with an array that included 'query_var' => MyTaxonomyName

  3. Hello – this is really the only page I have found about using this function. With this are you able to create a new taxonomy such as MyTags and have that apply to posts? I.e. so you can have the normal tags as one taxonomy and then MyTags as another?

    Obvioulsy I would need to edit the form for adding etc. but I have not been able to find out if this is the right function for doing this. Any advice would be much appreciated!

    Chris.


Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

www.bigmasala.com (53) - wordpress (17) - bigmasala.com (15) - register_taxonomy (15) - zack treadwell (13) - gorom masala (11) - FTVgiris.com (8) - wordpress register_taxonomy (7) - ftv giris.com (6) - www.masalavideos.com (5) - f.t.v giris.com (5) - bugs eyes (5) - eyes bugs (5) - ftv giris (5) - www.ftvgiris.com (4) - www-masalavideos-com (4) - www.bad girls videos.com (4) - wwwPRIVATEvideo (4) - www.bigmasala.vido.com (3) - ftvgiris (3) - www.ftv.coom (3) - xxl.animal.com (3) - big masala.com (3) - shallow all (3) - www.gorom masala.com (3) - gorom masala sex (3) - register_taxonomy() (3) - www.FTV GIRIS.COM (3) - 18 only giris.com (3) - www.big masala.com (3) - www.privatevideocom. (2) - 18only giris.com (2) - Giris.COm (2) - www.18-girl (2) - tv grils.com (2) - gorom masla photo (2) - www.Bad gun girls.com (2) - sex gorom masala (2) - big.masala.com (2) - ftv grils. com (2) - farmers girls.com (2) -