Wordpress 2.1 broken blogroll fix
It took me a little while and some indepth looking in my databases, but I did find a fix for it in my template. I would imagine that most of the others can be fixed in the same fashion.
Here is the code that was used before the upgrade to pull the blogroll:
And here is the code with the change that makes it work:
I haven’t a clue what changed in the WP code, but it basically fubar’d the SQL that pulled the blogroll. Essentially, the -1 in the first bit of code was getting appended to a column name in the SQL rather than the column having it’s proper name in the SQL. So it became CAT_-1 instead of the CAT_ID that it should have been. Changing the -1 to ID seems to have alleviated the problem. It also doesn’t appear to have broken anything by making that change so for now I leave it.
Technorati Tags: wordpress, fix, blogroll fix, sql, code

















March 28th, 2007 at 4:18 am
Nice post - but I would highly suggest putting the code in code tags so that visitors can copy/paste it. Using an image means that you have to type it whilst looking at the image, quite tedious if you don’t have dual screens.