If you upgraded WordPress to 2.5 and above, you will most likely encounter the Fatal Error problem when trying to activate the Popularity Contest Plugin by Alexa King even if you downloaded the latest version (currently 1.3b3).
Here is the fix for the fatal error:
1. Open popularity-contest.php
2. Scroll down to line 59.
3. Find require(’../../wp-blog-header.php’);
4. Replace with require(’../wp-blog-header.php’);
If you activated it and it displayed the wp_ak_popularity does not exists error, go to your MyPHPAdmin in your control panel for your server, run the following SQL queries:
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;
Verify the 2 tables exist and try to activate the plugin again. It should work now.
Popularity: 4% [?]
Like this post? Subscribe to my RSS feed and get loads more!




























2 comments
Ruben-RY on September 19, 2008 at 10:25 pm
Oh oh thank you very much for this piece of code.
You saved my day!
Kim Beasley on October 31, 2008 at 10:20 pm
Your post helped save me many hours of programming and research. Thanks for sharing!!!