So far — I appear to have found a fix to the 2.1 upgrade-blogroll links problem on my Tiga theme site.
I was having the same problem with the database error message mentioned above, with my links not showing up in the sidebar-widget on my Tiga theme. I finally solved it late last night (with lots of help from dozens of messages posted on the forums here) and cleaned it up today. I’m no programmer, but my site is now working (fingers crossed) and maybe my ordeal can be helpful or inspire a better solution by someone else.
First, after messing around for hours and failing to get the sidebar widget to display the blogroll links, I tried Rtcunningham’s very helpful fix outlined above. Though I had to tinker with the css to get it to match my site, it ended up creating an ingenious workaround. As long as the sidebarwidget plugin was turned OFF, I could get the blogroll links to appear in the Tiga sidebar more or less where I wanted them.
Along with new css, the key for me was replacing the whole links manager section inside Tiga’s sidebar.php file with the code from Rtcunningham:
<!– Begin – Links from the ‘Links Manager’ –>
<div class=”bookmarks”>
<?php wp_list_bookmarks(); ?>
</div>
<!– End – Links from the ‘Links Manager’ –>
This of course eliminated the code that seemed to be causing the problem after the 2.1 upgrade — “…$link_cats = $wpdb->get_results(“SELECT cat_id, cat_name FROM $wpdb->linkcategories”);…”
It worked. But I wanted my widgets back! In the end, I could not give them up. (Is this a sign of addiction?) So I kept fumbling forward, reassured that I had a workaround if I couldn’t figure it out.
I wasted a lot of time messing with the “function widget_links($args)” section of the widgets.php file of the sidebarwidgets plugin, but I ended up leaving it alone. I also deleted all my links and categories and rebuilt them. It made no difference. And I reran the install too. Nothing helped.
No matter what I did, when I reactivated the sidebar widgets plugin, I got the same database error message that mentioned the code I’d cut from the sidebar.php. I realized that meant some other file was making the illegal call, but I had no idea where to look.
Then, something I read on another thread here made me go hunting through Tiga files line by line. And what do you know, I found the second bit of problem code in the tiga.php file.
/* Links from the ‘Links Manager’ */
$link_cats = $wpdb->get_results(“SELECT cat_id, cat_name …” AND SO ON.
After backing up, I cut all of the links manager code until “Override the default ‘Pages’ widget” from this file. Left this section of the file totally blank. And saved it.
Presto. My blogroll links began showing up in the sidebar widget again, right where I had dragged the “link” icon in the sidebar widgets management page. I think the wp_list_bookmarks() in the widgets.php file had taken over the same work as the instructions that I cut from the tiga.php file. But I really don’t know.
Of course, the links displayed by category but were messed up in appearance. So I checked the page source. It turned out the blogroll links and their categories had been given a class of “linkcat.” (Where did that come from?) So, to make them line up properly inside the blue-white Tiga widget boxes, I added this code to my style.css file.
.linkcat {
width: 125px;
text-align: center;
padding:10px 5px;
border-width:1px;
border-style:solid;
margin: 0 5px 5px 0;
background-color:#FFFFFF;
list-style-type:none;
}
.linkcat ul {
list-style-type: none;
padding:0px;
margin:0px;
}
.linkcat li {
text-align: center;
}
I don’t know if this process can be generalized to other themes, but it worked on my Tiga site. Removing the old links code from two different files in the theme was the key, in my case. Plus a bunch of new css work. I hope this saves someone some time, or contributes to some snazzy fix from all the bull-goose WP programmers out there. Cheers.