WordPress.org

Support

Support » Plugins and Hacks » simple tagging – database problem

simple tagging – database problem

  • I’m new to wordpress and I installed WP 2.2. Pluggin Simple Tagging does not work and it outputs in the sidebar:

    WordPress database error: [Not unique table/alias: ‘stptags’]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.post_id) LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.post_id) WHERE 1=1 AND (post_type = ‘post’ AND (post_status IN(‘static’, ‘publish’) OR post_status = ‘private’)) AND stptags.tag_name IN (‘software’) AND stptags.tag_name IN (‘software’) GROUP BY wp_posts.ID HAVING COUNT(ID) = 1 ORDER BY post_date DESC LIMIT 0, 5

    and so on…

    Does anyone have a clue on how to fix this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • davidbibo
    Member

    @davidbibo

    Greetings,

    Using WP 2.2.

    I have also posted this support question on the simpletagging support site.

    Whenever users click on tags at the bottom of our posts, they’re successfully taken to a page with all of the posts for that tag but in the sidebar appears an error:

    ‘WordPress database error: [Not unique table/alias: ‘stptags’] SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.post_id) LEFT JOIN wp_stp_tags AS stptags ON (wp_posts.ID = stptags.post_id) WHERE 1=1 AND (post_type IN(‘page’, ‘post’) AND (post_status IN(‘static’, ‘publish’) OR post_status = ‘private’)) AND stptags.tag_name IN (‘Giuliani’) AND stptags.tag_name IN (‘Giuliani’) GROUP BY wp_posts.ID HAVING COUNT(ID) = 1 ORDER BY post_date DESC LIMIT 0, 10′

    Example: http://roguelystated.com/tag/Giuliani

    Thanks for any help you can provide,
    David

    davidbibo@roguelystated.com

    davidbibo
    Member

    @davidbibo

    Please note the fix referenced here worked for me. Good luck to others struggling with this.

    In case you have trouble with the embedded scrolling window on that page, here’s the fix:

    Line 675:
    $join .= ” LEFT JOIN {$this->info[‘stptable’]} AS stptags ON ({$wpdb->posts}.ID = stptags.post_id) “;

    change by adding the following line, preceding the $join line:
    if(!ereg(‘stptags’,$join))

    so you end up with:
    if(!ereg(‘stptags’,$join))
    $join .= ” LEFT JOIN {$this->info[‘stptable’]} AS stptags ON ({$wpdb->posts}.ID = stptags.post_id) “;

    Cheers,
    davidbibo@roguelystated.com

    upon deactivating the plugin, it doesn’t delete the items it creates in the database and when i deleted those items then tried to activate it again it results in an error,

    wish these plugins would clean up after themsevels when deactivating :))

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘simple tagging – database problem’ is closed to new replies.