WordPress.org

Ready to get started?Download WordPress

Forums

Error in upgrade install of 2.0 (6 posts)

  1. dtclarinet
    Member
    Posted 8 years ago #

    I just installed 2.0 and upgraded a fairly new blog from 1.5.2 in which I am using the K2 theme. Everything went smoothly, except this error appears at the top of each post.

    I'm just reporting, not complaining.

    WordPress database error: [Unknown column 'user_level' in 'where clause']
    SELECT COUNT(*) FROM wp_users WHERE user_level > 2

  2. nicholaswong
    Member
    Posted 8 years ago #

    I've similar error msg of the "user" part, and I dunno why after I installed RC3, my recent post can't work.

    Here're the code:

    <?php get_recent_posts(); ?>

    Also, when I clicked upgrade.php, error msg shown as below:

    WordPress database error: [Table 'wordpress.wp_usermeta' doesn't exist]
    SELECT meta_key, meta_value FROM wp_usermeta WHERE user_id = '1'
    WordPress

    I ignored it and click upgrade, and seems nothing strange happened...

  3. mattman
    Member
    Posted 8 years ago #

    dtclarinet - K2 has a known error in it. The way users are managed has changed between the currently stable 1.5.2(strayhorn) and 2.0.

    To fix this problem, go into theme editor->theloop.php and remove this line:

    get_var("SELECT COUNT(*) FROM $wpdb->users WHERE user_level > 1"); if ($count_users > 1) { ?> by

    This appears twice, so make sure you remove both. When K2 127 is released(currently in svn) it will only support WP 2.0

  4. mattman
    Member
    Posted 8 years ago #

    I just went on a furthur look, and it appears the following code will also work :D

    Published <?php /* If there is more than one author, show author's name */ $count_users=$wpdb->get_var("SELECT COUNT(*)
    FROM $wpdb->usermeta WHERE meta_value REGEXP 'contributor|author|editor|administrator'");if($count_users>1){ ?> by <?php
    the_author_posts_link();} ?>

    It may be an idea to check the official K2 support forums - http://flickr.com/groups/binarybonsai/

  5. dtclarinet
    Member
    Posted 8 years ago #

    I've heard about the new release of K2, which will support 2.0. I'll upgrade as soon as it comes out. Thanks. Otherwise everything seems to be working...

    David

  6. dtclarinet
    Member
    Posted 8 years ago #

    Thanks, that code popped right in and cleaned it up.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.