WordPress.org

Ready to get started?Download WordPress

Forums

2.1 Blogroll Problem (43 posts)

  1. aczafra
    Member
    Posted 7 years ago #

    anybody knows how to resolve this problem after upgrading to 2.1? Thanks.

    "WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
    SELECT cat_id, cat_name FROM"

  2. Robert Koehler
    Member
    Posted 7 years ago #

    I'm getting a very similar error:

    "

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY cat_name ASC' at line 1]
    SELECT cat_id, cat_name FROM ORDER BY cat_name ASC

    Being, well, not technically inclined, it's been a major headache. Any help on this would be appreciated.

  3. Trent Adams
    Member
    Posted 7 years ago #

    The call for links or blogrolls have changed in 2.1. Maybe try calling it with what is in the default template in WordPress 2.1:

    <?php wp_list_bookmarks(); ?>

    Trent

  4. froman118
    Member
    Posted 7 years ago #

    Like Trent said, use the standard template functions and you should be fine. Any custom link queries that were written before 2.1 will break and error out because the linkcategories table no longer exists.

  5. aczafra
    Member
    Posted 7 years ago #

    thanks Trent and froman. got it fixed.

  6. gimmeahug
    Member
    Posted 7 years ago #

    i tried to replace the old code with what trent wrote but: i still get
    -------------------------
    WordPress database error: [Unknown column 'link_count' in 'where clause']
    SELECT * FROM wp_1categories WHERE cat_ID > 0 AND link_count > 0 ORDER BY cat_name ASC
    #
    -------------------------
    where the blogroll should be.
    and in the blogroll management i get

    ------------------------------
    [long code moderated]
    --------------------------------------

    but adding links and deleting and all works. i re-installed 2.1 3 times now, never had a problem with the installation. can anyone help me on this?
    the domain by the way is "whataboutpj.com" - so thats whats in the code.

  7. 37prime
    Member
    Posted 7 years ago #

    I am having the same problem. I installed 2.1 on a newly created blog.

    Following Trent and froman118 advice, and still no luck.

  8. Evita
    Member
    Posted 7 years ago #

    I have the same errors. Links are only displaying with template tag get_links.
    Hope this helps.

  9. gimmeahug
    Member
    Posted 7 years ago #

    get_links doesn't work for me. what works though is wp_get_linksbyname but i don't want to use that since links won't fit to my page layout then.

  10. spencerp
    Member
    Posted 7 years ago #

    Something in this thread might lead you on the right path? Good luck!

    spencerp

  11. RavanH
    Member
    Posted 7 years ago #

    In my case all my blogrolls were copied to categories (but empty) after upgrading from 2.0.7 to 2.1

    Anyone noticed this?

  12. Lace
    Member
    Posted 7 years ago #

    RavanH, got the same prob as you. Now I have those blogroll categories in two places. :(

    When I click on the "categories" that were added after the 2.1 update (in left sidebar), I get a 404 page. You can see my example of this at http://memorylaneproducts.com

    Lace

  13. Matt
    Member
    Posted 7 years ago #

    Any idea how to fix this, then?
    function yy_widget_links($args) {
    global $wpdb;
    $title = empty($options['title']) ? __('Links') : $options['title'];

    $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    ?>
    <h2><?php echo $before_widget.$before_title.$title.$after_title; ; ?></h2>
    <ul>
    <?php
    foreach ($link_cats as $link_cat) {
    ?>
    <li id="linkcat-<?php echo $link_cat->cat_id; ?>"><?php echo $link_cat->cat_name; ?>
    <ul>
    <?php wp_get_links($link_cat->cat_id); ?>
    </ul>
    </li>
    <?php } ?>
    </ul>
    <?php
    }

  14. Lace
    Member
    Posted 7 years ago #

    RavanH,

    I fixed my site with the info found in this article. The article tells you how to exclude categories and other things. After I fixed the category prob, the My Category Order plugin I had works just fine!

    Here is the info link I used to change the code in my sidebar: http://codex.wordpress.org/Template_Tags/wp_list_categories (scroll to see "Categories with Excludes")

    Lace

  15. gigas
    Member
    Posted 7 years ago #

    I have the same problem for Link:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]

    SELECT cat_id, cat_name FROM

  16. buntingw
    Member
    Posted 7 years ago #

    I am getting the following:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
    SELECT cat_id, cat_name FROM

    Any help would be greatly appreciated since I am new at this!

  17. moshu
    Member
    Posted 7 years ago #

    Which solutions did you try from the posts above?

  18. buntingw
    Member
    Posted 7 years ago #

    Im not exactly sure where to put any of the code solutions above. The first part of code from my sidebar is:

    [mod - long code removed]

  19. moshu
    Member
    Posted 7 years ago #

    Don't post long code here, nobody can read it.

    Use http://wordpress.pastebin.ca and post back with the URI. Somebody might be able to help

  20. buntingw
    Member
    Posted 7 years ago #

    Got it to work using <?php wp_list_bookmarks(); ?>, http://www.joynerlibraryblog.com/ but it just places the link in two places now.

  21. mbrando
    Member
    Posted 7 years ago #

    I'd like to add that the category ID's have all changed too. I had some code that wold use get_links() and the ID number for the categories are different in 2.1 vs. 2.07

    Mike

  22. Southwest
    Member
    Posted 7 years ago #

    Alright, this is a problem I have as well. I've posted my stuff to the pastebin-- you can see it here. I don't know what there to replace with the <?php wp_list_bookmarks(); ?> code, though-- any help would be greatly appreciated.

    Thanks!

  23. sfam
    Member
    Posted 7 years ago #

    I'm really confused here. Previously I had a set of links down the sidebar grouped into categories. How do I get this to display this way again?

    Some of my links went to internal pages, and others when to external sites. It seems that the categories for the links have been merged.

    The stuff above seems to be talking about showing categories as well. I just want to show my blogrolls. Is there a way to do this now?

  24. Marque
    Member
    Posted 7 years ago #

    Im having the same problems as buntingw and gigas.

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]

    SELECT cat_id, cat_name FROM

    What does this mean? How can I SPECIFICALLY fix it?
    Ive read through this thread and nothing has fixed it yet

  25. davenj
    Member
    Posted 7 years ago #

    Read these pages if you haven't already found them.
    Template Changes - http://lorelle.wordpress.com/2007/01/26/wordpress-21-template-tag-and-function-changes/

    codex for list categories - http://codex.wordpress.org/Template_Tags/wp_list_categories (mentioned in post above) and

    codex for bookmarks - http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

    Southwest, if you're still looking - Try replacing <?php get_links_list(); ?> with <?php wp_list_bookmarks('category='); ?>

    Here is what I have done on talkjunkie.com to separate and call the categories and the link(bookmark) categories: On the left sidebar I'm using - <?php wp_list_categories('orderby=name& hide_empty=0&exclude=34,29,36,31,33,30,37,32,35& hierarchical=1& title_li=0'); ?></ul>

    On the right sidebar I use - <?php wp_list_bookmarks('category=33,34,37,35'); ?>
    <?php wp_list_bookmarks('category=30,31,32,36'); ?>

    If anyone comes across a good explanation of why the category merge is an improvement, I'd love to read it.

  26. sfong15
    Member
    Posted 7 years ago #

    davenj, I agree, I would love to see 'em turning back to wp_list_links. I just don't see the merits.

    Word of experience one has to locate id of the links (category now) in order to fix your theme.

  27. Marque
    Member
    Posted 7 years ago #

    Now here is what I am trying to do to my sidebar on http://www.themarque.org

    http://wordpress.pastebin.ca/333814

    It isnt working.
    I found that it works if I add

    <?php wp_list_bookmarks('category='); ?>

    after <?php } ?>

    But it still leaves the "Links" box with the error. So if I try to completely delete the link box, etc the sidebar disappears into an error all together.
    How do I get my links (blogroll) to show back up under "Links", or at least have "Blogroll" substiture for it?

  28. rwdoman
    Member
    Posted 7 years ago #

    I'm getting this.

    WordPress database error: [Unknown column 'cat_1' in 'order clause']
    SELECT * FROM wp_categories WHERE cat_ID > 0 AND link_count > 0 ORDER BY cat_1 ASC

    Links set up in the dashboard, zilch on the site. Does anyone have a quick cut and paste patch idea to try (with noobish explainer on how/

    Thanks!

  29. Marque
    Member
    Posted 7 years ago #

    Hehe, I know this sounds repetitive. But I still need a noobish way to do this. Can someone just say exactly what to do?

    My information is two posts up.

  30. c0y0te
    Member
    Posted 7 years ago #

    Folks,

    I had the same problem and simply replaced the original code with <?php wp_list_bookmarks(); ?> and it all worked fine.

    c0y0te
    http://www.avalon5.com
    "Howl @ The Moon!"

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags