Forums

Popularity Contest Plugin problem with beta 1.3b2 (4 posts)

  1. werelax
    Member
    Posted 4 years ago #

    the plain popularity plugin works but when I try to use the one by category or author I get a series of errors

    WordPress database error: [Unknown table 'wp_posts' in group statement]
    SELECT ID, post_title FROM wp_posts p LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id LEFT JOIN wp_ak_popularity pop ON p.ID = pop.post_id WHERE tt.term_id = '2' AND tt.taxonomy = 'category' AND post_status = 'publish' AND post_type = 'post' AND post_date < NOW() GROUP BY wp_posts.ID ORDER BY pop.total DESC LIMIT 10

  2. cortez1004
    Member
    Posted 4 years ago #

    Same problem.

    Has someone find a solution for this?

  3. cortez1004
    Member
    Posted 4 years ago #

    I found a solution on http://alexking.org/blog/2007/10/02/popularity-contest-13b2

    Dane Morgan:
    " For the akpc_most_popular_in_cat() problem I have found a solution. I’m guessing it’s a MySQL version issue.

    Throughout the plugin code there are queries similar to:

    $posts = mysql_query(”
    SELECT p.ID
    FROM $wpdb->posts p
    LEFT JOIN $wpdb->ak_popularity pop
    ON p.ID = pop.post_id

    By deleting the ‘p’ from each occurance of ‘$wpdb->posts p’

    and changing each occurance of ‘p.COLUMN_ID’ to ‘$wpdb->posts.COLUMN_ID’

    I was able to get the most popular by category function to work. Everything else seems to continue working as well.

    I have this working now on my blog."

    Thank you Dane !

  4. grahamenglish
    Member
    Posted 4 years ago #

    I'm having the same issue and can't find the code p.COLUMN_ID in the plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic