Zen do Ryu Remote Viewing© with Palyne Gaenir

Archive for the ‘Boring IT Stuff’ Category

Tech headaches

Sunday, August 26th, 2007

It’s always something. WordPress 2.2 is the latest version of my blog software and I installed it as part of setting up this blog. As it turns out, there are PhP errors in the default installation that were causing errors on my blog. My server support couldn’t help… the problem was not the server.

Now you might think that wading through lines of code is something nerds like me do in my sleep, but you would be overlooking two minor points:
1 – I know nothing about wordpress, and
2 – I know nothing about PhP, the code it’s written in.

Despite this, I actually managed to find two bugs in the source code, which is probably a no-brainer, but of which I’m unreasonably proud. Probably because of the amount of time it took me!

So I’m putting it here so when some poor sap installs WordPress 2.2 (or a new theme later when still on 2.2) and goes searching for why his blog is broken, he might just find this post and it’ll help.

found bug 1
Directory: wp-includes
File: bookmark-template.php

line 331
'category_orderby' => 'name', 'category_order' => 'ASC', 'class' => 'linkcat',
needs to be changed to
'category_orderby' => 'cat_name', 'category_order' => 'ASC', 'class' => 'linkcat',
that resolves the problem of themes which call the bookmarks function such as
php wp_list_bookmarks();

found bug 2
Directory: wp-includes
File: bookmark-template.php
line 293
function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {

needs to be changed to
function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'cat_name', $limit = -1) {

that resolves the problem of themes which call the categories function such as
php wp_list_categories();

Mind you I also find ‘name’ instead of ‘cat_name’ issues in links.php(line526) and template_functions_category.php(line122) and category.php(line22) but it’s possible those are NOT bugs; changing them didn’t do anything for me, but if I run into more similar bugs I’ll know where to look.