WP plugins – 1 fix and 1 update

Following my recent upgrade to WordPress 2.5 (RC1) on my other blog/website I could not get my favourite statistic plugins working. The first, WP Slimstat, is no longer under development and is not compatible with WP 2.3 and above. The latter, Popularity Contest, is supposed to work with the latest WP versions but triggered a fatal error during install (at least for me).

At first glance it would appear I’d have to look somewhere else for alternatives. On the other hand I could dive into the code and try figuring things out myself. I decided on the last option.

Fix – Alex King’s Popularity Contest (v.1.3b3)

Fixing the installation error was far easier than anticipated. This is what you need to do if you experience any difficulties or plan on upgrading:

  • If you have an older version deactivate the plugin.
  • Download the latest release (link above).
  • Open popularity-contest.php and scroll down to line 59. Replace
    require('../../wp-blog-header.php');

    with

    require('../wp-blog-header.php');
  • Upload the edited file to your plugins folder (sub directory popularity-contest)
  • Reactivate the plugin

I tried posting a comment mentioning the problem, but it went into comment heaven. The issue will most likely be solved with the next release (but I couldn’t wait…).

Update: In case you are doing a fresh install you might also need to create the DB tables manually. More about how to do this here.

Update – Camu’s WP Slimstat (v.0.92)

To avoid repeating myself please see my post “How to view and collect visitor statistics” for a proper solution. This tiny update should keep WP Slimstat working until the WordPress team decides on more DB changes. With any luck this might take awhile…

The “IP to Country database” update is not necessary, and will only apply for new log entries. However, to keep the data more or less correct it is probably a wise decision to have the database more up to date.

Feel free to let me know if you have any difficulties running these updates, or know of other plugins you’d liked “fixed”.

About Author

109 Comments on “WP plugins – 1 fix and 1 update”

  1. THANK YOU!!!

    Thank you for the fix for popularity contest – it was driving me a little mad having the Options theme and no popularity contest anymore!

    Such an easy fix too!

  2. Can’t believe the author hasn’t updated the plugin. You and I can’t be the only one experiencing this!? Even if he’s a busy man it would only take around 1 min…

    Glad I could be of help though, and your blog is quite impressing 🙂

  3. I must have bad luck because, this didn’t do it for me. I got a “Parse error: syntax error, unexpected ‘.’ “. Maybe you guys can help me because I’m stumpped.

  4. It seems that I have bad luck like Jonathan does because I’m having the same error. After redownloading and replacing the line of code, it’s still giving me a parse error. Any ideas?

  5. Gosh! Thx dude, you really helped me out! I was having the same trouble with Pop. contest plugin. thanx! 🙂

  6. Hey, that helped me fix the problem.

    For others (above) copying and pasting the new code from this page … it won’t work (see parse error comments above). The single quotation marks will most likely be wrong. Check your .php file and compare the quotation marks with others just below. You’ll probably see they are “slanted” and that’s why you’re getting a parse error (usually around line 117 or whatever). Fix the quotation marks and everything will be fine.

  7. Whew! Thanks for the Popularity Contest fix. There is no way I’d have figured that out on my own, and I wouldn’t upgrade to 2.5 if I couldn’t use Popularity Contest.

  8. Pingback: Mimos blogg
  9. Thanks! The popularity contest fix was need with 2.5 Release as well – glad it was so easy to fix!

  10. Just wanted to say a quick thank you for the fix. If you still get a parse error, make sure your quotation marks are correct as poster #12 says.

    Best way to fix it is to manually edit and avoid copying and pasting code!

  11. Am I the only one the fix doesn’t work for? I’ve replaced line 59, and I still get the error message when I try to install the Popularity plugin, unfortunately 🙂 And no, I didn’t just paste it 🙂

  12. Thanks for saying so Thomas you are welcome to visit whenever you like! I was surprised too that it hasn’t been fixed – I’m having the same problem with Firefox beta 3 and its plugins – care to extend yourself further? LOL

  13. Haha – good one 🙂 If I win the lottery this weekend that would open an 8 hour window…

    I wouldn’t worry to much about the plugins, it’s still a few months until the official release (FF3). Most things will be sorted by then (I hope). It might even pass the acid3 test while still staying secure unlike others with names starting with Safari.

    For the rest of you still having problems I’ve added a second fix (reference) in the post above.

  14. perfect, thank you for the “popularity”-fix, for repairing a great plugin.

  15. I did the fix and … NO JOY! Still got the “Fatal Error” in my blog that’s using WP2.5. Double-checked and see that my fix is precisely as directly but it doesn’t work. Any further thoughts or advice?
    Thanks.

  16. David, did you copy and paste or did you change the file manually (see #12)?

    If you’d like I can have a look at your file and check for errors.

    Also make sure the necessary DB tables are still there (see update in post above).

  17. Thomas,
    That would be very nice of you. My email is dehenderson@mac.com. Shoot me an email and I will send the file.
    I had upgraded to WP2.5 with Popularity Contest active and it corrupted my site. I then deleted P-C and got my site back and working. I am, quite frankly, very apprehensive about messing with the Sql. I had a took and saw trouble written all over any attempt I might make.
    David

  18. Thanks for the info. I did have to create the new tables but your fix and instructions pointed me in the right direction!

  19. Thomas,
    Cheers! Thank you so much for assisting. Popularity Contest now works perfectly. Still amazing that Alex King has not updated his plugin. But, it is terrific there is a global community of bloggers, including you, who freely share tips and guidance.
    All best,
    David

  20. Thank you so much for posting this fix !

    FOR THOSE WHO ARE STILL HAVING PROBLEMS AFTER REPLACING THE TEXT REMEMBER TO CHECK THAT YOUR QUOTATION MARKS ARE NOT SLATED ! I KNOW THIS HAS BEEN POSTED BUT JUST WANTED TO HIGHLIGHT THIS AGAIN AS IT TOOK ME QUITE A WHILE BEFORE I FOUND OUT IT WAS THE PROBLEM.

  21. You should now be able to cut and paste the “Popularity Contest plugin” fix/update directly from the post above. Added the PRE tag around the “code” to get the correct “quotes” when copying.

    Let me know if otherwise…

Comments are closed.