Fix Popularity contest error in WordPress 2.5

Posted on June 5, 2008

One of my favorite plugins is Alex King’s Popularity Contest. Unfortunately it doesn’t seem to work with the latest WordPress release 2.5, nor Wordpress 2.5.1.

By doing a little searching on WordPress.org Forums I found this post which explains how to fix the Fatal Error problem I’ve been getting. What you need to do is change the line 59 of the popularity-contest.php file from this:

require('../../wp-blog-header.php');

to this:

require('../wp-blog-header.php');

Ok so, that fixed the fatal error problem, and those of you who had the plugin installed prior to updating to WordPress 2.5 shouldn’t have any other problems.

However, if you’re installing the plugin for the first time you might be getting another error ‘Table ‘database.wp_ak_popularity_options’ doesn’t exist on line: 124‘.

Then please run the following scripts under phpadmin:

CREATE TABLE IF NOT EXISTS wp_ak_popularity (
post_id int(11) NOT NULL,
total int(11) NOT NULL,
feed_views int(11) NOT NULL,
home_views int(11) NOT NULL,
archive_views int(11) NOT NULL,
category_views int(11) NOT NULL,
single_views int(11) NOT NULL,
comments int(11) NOT NULL,
pingbacks int(11) NOT NULL,
trackbacks int(11) NOT NULL,
last_modified datetime,
KEY post_id (post_id)
) ENGINE=MyISAM;

CREATE TABLE IF NOT EXISTS wp_ak_popularity_options (
option_name varchar(50) NOT NULL,
option_value varchar(50) NOT NULL
) ENGINE=MyISAM;

Now,pls try to reactivate this plugin!

Good Lucks!

Popularity: 4% [?]

» Filed Under Blogging

Comments

Leave a Reply