The problem(s): With some upgrades of the WordPress 2.5 branch, the Popularity Contest WordPress plugin is not working properly. Also, people trying to activate the Popularity Contest plugin on a brand new WordPress install are getting a fatal error or a “doesn’t exist” message when attempting to activate the plugin.

The solution(s): I actually ran into this problem on a fresh install of WordPress. After several attempts, I was unable to figure out the problem myself. Thankfully, a quick Google search showed a post over at WPGuy which gave details on fixing both problems!

Here is what you need to know if you have this problem:

Fix problems with the upgrade to WordPress 2.5

Open your Popularity Contest plugin (edit it) and search for this code:

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

And replace it with this:

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

Fix problems with a new install of WordPress 2.5

In addition to doing the above, you need to search for the following code:

if (isset($_GET['activate']) && $_GET['activate'] == ‘true’) {

And replace it with this:

if (isset($_GET['action']) && $_GET['action'] == ‘activate’) {

I went through both of these steps on my fresh WordPress install and it fixed the problem perfectly!

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |

There Are 13 Responses So Far. »

  1. 1 P7
    Thursday, June 5th, 2008 at 5:36 am

    Thanks, I was looking to fix this for quite sometime. P7

  2. 2 Remkus
    Thursday, June 5th, 2008 at 9:30 am

    I was looking for the answer to it just as well, but it did absolutely nothing for me. I tried to use both hacks but all I ended up with was an error message: Table ‘corpblogwp.wp_ak_popularity_options’ doesn’t exist on line: 124

    No clue, whatsoever :S

  3. 3 Thaya Kareeson
    Thursday, June 5th, 2008 at 12:31 pm

    It’s sad that a lot of Alex King plugins are no longer supported leaving all of us hanging dry. I have packaged this fix and a fix to make Popularity Contest cacheable here. I’ve notified Alex of these fixes and hopefully he can incorporate these fixes into his next release of Popularity Contest.

  4. 4 Susan
    Thursday, June 5th, 2008 at 3:39 pm

    Awesome, I didn’t know about the 2nd part you added. This is great, thanks for this!

  5. 5 Keith Dsouza
    Thursday, June 5th, 2008 at 4:36 pm

    This is a great tip, I was hoping for the author of the plugin to update the plugin but this definitely saved me a lot of hassles.

  6. 6 Leland
    Thursday, June 5th, 2008 at 6:00 pm

    I thought my popularity contest was broken because of the WP-SuperCache, not because of WP 2.5. Guess it’s because of both! Thanks for the post.

  7. 7 Thaya Kareeson
    Thursday, June 5th, 2008 at 6:04 pm

    @Leland
    You’re welcome. Please feel free to provide any feedback you have.

  8. 8 Kyle Eslick
    Thursday, June 5th, 2008 at 7:32 pm

    Glad everyone found this post useful. Like I said above, I only found it because I was having the same problems.

    I know Alex is busy, but it would indeed be great if someone took over supporting his plugins? He has a few that are almost required with any WordPress install.

  9. 9 wang adsense
    Thursday, June 5th, 2008 at 7:40 pm

    Great, I been a while since my site lost their popular post.
    Thanks for the guide.

  10. 10 Thaya Kareeson
    Thursday, June 5th, 2008 at 7:54 pm

    @Kyle Eslick
    I would love to take over support for Popularity Contest as I already learned a lot of its internals, but the last time I chatted with him, it seems like he’s not ready to let it go yet. The only thing I can do is maybe come up with a better statistics plugin and publish that instead.

  11. 11 Chicken Say
    Friday, June 27th, 2008 at 11:16 am

    Thanks for the tip…i was going to fix it myself but lazy to read thru the code again…luckily i found this page… :P



Leave A Comment