WordPress.org

Ready to get started?Download WordPress

Forums

After 2.1 update, I now have "No Categories" written above every page (15 posts)

  1. tseryan
    Member
    Posted 7 years ago #

    For some reason, after upgrading to version 2.1, my blog has "No categories" written above each page. It's on every blog page and every admin page. It was never there before. :/

    My blog is http://rv2.org, if you don't quite understand what I'm saying. It would really be nice to get rid of it. :)

    Thanks!
    Ryan

  2. Shoe76
    Member
    Posted 7 years ago #

    @tseryan

    Found a blog post called "Migrating Your WordPress 2.0 themes over to WordPress 2.1" that could help out.
    In it the author said that "... WP2.0: wp_list_cats()
    WP2.1: wp_list_categories()
    Found in archives.php, sidebar.php
    wp_list_cats() still works but has been deprecated"

  3. tseryan
    Member
    Posted 7 years ago #

    Just checked and I don't use any of these tags. I'm not sure if it's a theme issue though since it appears above each of my admin pages as well. Thanks for your help though!

  4. mariogarcia
    Member
    Posted 7 years ago #

    I have the same problem when i upgraded my 2.0.7 blog to 2.1. I have lost my categories and this appears in category when i write posts:

    WordPress database error: [Unknown column 'link_count' in 'where clause']
    SELECT cat_ID FROM wp_categories WHERE category_parent = 0 AND ( link_count = 0 OR category_count != 0 OR ( link_count = 0 AND category_count = 0 ) ) ORDER BY category_count DESC

    I have used phpmyadmin i can see i haven't got wp_link2cat too. I have problems also with links...

    Two eerors are about wp_link2cat, that it does not exist:

    WordPress database error: [Table 'wordpress.wp_link2cat' doesn't exist]
    SELECT link_id FROM wp_link2cat WHERE category_id='6'

    :(

  5. tseryan
    Member
    Posted 7 years ago #

    I don't have the SQL errors and I have the wp_link2cat table. I've tried digging through a bunch of php files and cannot find where the "No Categories" is coming from or why it is there. The blog appears to be working perfectly aside from that error.

  6. tseryan
    Member
    Posted 7 years ago #

    It turns out I figured out the problem. It wasn't related to wordpress at all, but a plugin. I looked through the page source and saw that the "No Categories" was coming from <?php wp_head(); ?> which means it has to be because of plugin. Only plugin regarding categories is catcloud (http://zak.greant.com/catcloud). When deactivated, the problem is gone. :)

  7. mariogarcia
    Member
    Posted 7 years ago #

    Ok, i'll look forward it but i don't have that table... i don't know why! I have to know how can i create or copy it because if i cannot do this i will back to 2.0.7 and it is possible i canot recover all very well :'(

  8. mariogarcia
    Member
    Posted 7 years ago #

    I have solutionated this two ISSUES because in upgrade some fields might be added to our database...

    In a few minutes i will report it

  9. mariogarcia
    Member
    Posted 7 years ago #

    TO SOLUTION THE CATEGORIES ISSUE AFTER UPGRADING TO 2.1
    1.- Create a new blog of wordpress 2.1 (in a different way like http://www.yourdoimain.com/blog2)
    2.- Go to your manage tab (in you real blog) in wp-admin and now to export. Download a xml backup of your wordpress blog
    3.- Make a database backup of your mysql wordpress database
    4.- Now (after installing the "blog2" go to options, reading and in Encoding for pages and feeds select you character codification (mine is ISO-8859-1)
    5.- DeleteGo to your mysql manager like phpmyadmin in you the "Hello World" post and comment if you like
    6.- Now go to wp-admin go to manage and then to import. Select wordpress and upload your xml backup you did before.
    7.- Now you have to go to you mysql manager like phpmyadmin. Enter in you blog2 database and export your wp_categories (only). Use a editor and change blog2 to your blog old database name (this is not neccesary)
    8.- Go to your mysql database manager of your real blog and remove your wp_categories database and import to wp_categories we downloaded and edited in the last step
    9.- Now it's all right :D You can choose categories from post manager

    TO SOLUTION THE LINKS ISSUE AFTER UPGRADING TO 2.1
    1.- If you haven't done TO SOLUTION THE CATEGORIES ISSUE AFTER UPGRADING TO 2.1 tutorial do the 1.- step listed (at least)
    2.- Go to your mysql manager like phpmyadmin in you new blog and enter in your blog and export wp_link2cat table. edit the table using an editor and change the name of the database to your real database of your blog
    3.- Go to your mysql manager like phpmyadmin in you old blog and import file we have downloaded in the last step
    4.- Now in wp-admin, in blogroll all must be ok.

    My english aren't very well... sorry

  10. ColimaRadical
    Member
    Posted 7 years ago #

    I solved it, doing something else... I just edited the /wp-admin/upgrade-functions.php and in the line 134 where it says

    // We are up-to-date. Nothing to do.
    if ( $wp_db_version == $wp_current_db_version )
    return;

    I deleted those lines, upload again that file and did the /wp-admin/upgrade.php again and that solved those issues. After I fixed it, I just restored the lines.

    It worked for me and it's easier. I hope it helps all.

  11. bafonso
    Member
    Posted 7 years ago #

    This solution you provide will throw off the relationships between categories names and IDs... not a good solution I believe.

  12. mariogarcia
    Member
    Posted 7 years ago #

    Which solution? Mine??? It's only to create these fields on wordpress database... why it's a bad solution? I suppose you say ColimaRadical's solution

  13. henkmsncam
    Member
    Posted 7 years ago #

    Colima

    I get after doing that:

    WordPress database error: [Access denied for user: '**@localhost' to database '**']
    ALTER TABLE wp_categories ADD COLUMN link_count bigint(20) NOT NULL default '0'

    WordPress database error: [Access denied for user: '**@localhost' to database 'admin_**s']
    ALTER TABLE wp_categories ADD COLUMN posts_private tinyint(1) NOT NULL default '0'

    WordPress database error: [Access denied for user: '**@localhost' to database 'admin_**s']
    ALTER TABLE wp_categories ADD COLUMN links_private tinyint(1) NOT NULL default '0'

    WordPress database error: [Access denied for user: '**@localhost' to database 'admin_**s']
    ALTER TABLE wp_posts CHANGE COLUMN post_status post_status enum('publish','draft','private','static','object','attachment','inherit','future') NOT NULL default 'publish'

    WordPress database error: [Access denied for user: '**@localhost' to database 'admin_**s']
    ALTER TABLE wp_posts CHANGE COLUMN post_type post_type varchar(20) NOT NULL default 'post'

    WordPress database error: [Access denied for user: '**@localhost' to database 'admin_**s']
    ALTER TABLE wp_posts ALTER COLUMN post_type SET DEFAULT 'post'

    WordPress database error: [Access denied for user: '**@localhost' to database 'admin_**s']
    ALTER TABLE wp_posts ADD KEY type_status_date (post_type,post_status,post_date,ID)

  14. Reuben
    Member
    Posted 7 years ago #

    Here's a non-intrusive solution:

    Edit category_template.php (in wp-includes). Change line 238 onwards to look like this:

    if ( 'list' == $style )
    $output .= '';#'

  15. ' . __("No categories") . '
  16. ';
    else
    $output .= '';#__("No categories");

  • Reuben
    Member
    Posted 7 years ago #

    Let me try again with quoted code:

    if ( 'list' == $style )
                            $output .= '';#'<li>' . __("No categories") . '</li>';
                    else
                            $output .= '';#__("No categories");
  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags