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
- 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”.
109 Comments on “WP plugins – 1 fix and 1 update”
From what I can find out, the line 59 fix only applies if you upgraded to WP 2.5 and already had Popularity Contest running.
If, like me, you put it on a fresh install, the line 59 fix will not work. You need to do some manual editing as well (if you’re comfortable with that.)
@Sheamus – you’re right, you need to create the DB tables manually as well. I’ve made that clear in my update in the post above (we’re linking to the same page…).
Hey I still have the problem. Even after replacing the code I get “fatal error” can’t figure out what the problem is. Help me.
You can comment on my blog with the solution would be really helpful.
Thanks, worked like a charm (already installed, upgraded to 2.5).
Great, it fix and really helps! Thanks a lot!
Thank you for the fix to Popularity Contest.
Now to check out slimstat.
Thanks for the fix. Much appreciated.
While this fix allowed me to update and Activate the new version, it COMPLETELY broke my WordPress blog, giving me the following errors:
Couldn’t write to: /var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/cache/wp-cache-ece47e3c947b4178b99228ff32ca3276.html
Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/cache owned by uid 48 in /var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 240
Warning: fopen(/var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/cache/wp-cache-ece47e3c947b4178b99228ff32ca3276.meta): failed to open stream: No such file or directory in /var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 240
Warning: fputs(): supplied argument is not a valid stream resource in /var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 241
Warning: fclose(): supplied argument is not a valid stream resource in /var/www/vhosts/lemonlaw.com/httpdocs/wordpress/wp-content/plugins/wp-cache/wp-cache-phase2.php on line 242
I don’t even want to begin troubleshooting this…
It seems rather obvious to me that this doesn’t have anything to do with WP in general but rather your cache plugin. Try clearing the cache or deactivating the plugin and see what happens…
I did that but still get an error
What error? Was it a fresh install? Have you changed the DB prefix? What version are you running?
Thanks for providing these solutions! I found your site through the wordpress forums, very nice layout and design! Thanks for the great information as I will be back to learn more to fix some other issues.
Its for me rather difficult, i’ve replace this: require(‘../wp-blog-header.php’); but there is still a error…i’m using wordpress. 2.5 1
Did you have the plugin installed before you upgraded to WP 2.5.x? Also make sure you add the quotes (‘) by hand. They should be completely vertical, otherwise you’re using the wrong quotes which will trigger a syntax error.
If it’s a fresh install you will also need to add the popularity tables to your database “manually”. Meaning using phpmyadmin or any other DB tool.
Let me know of you still have problems after trying this out…
Thanks for the fix for Popularity contest. I finally upgraded today to 2.5.1 from 2.3 using your tip
I was already using it prior to that so I had the database already.
Not working on WordPress 2.51 : ( , I even tried copying and pasting, and re-writing the code from scratch – still gives a Fatal Error
@AlexD – are you sure you have the necessary DB tables installed? Also, if you are not using wp_ as your DB table prefix, this needs to be edited as well…
The plugin DOES WORK on 2.5.1 (I’m running it here!).
Hmm, this doesn’t work for me on any of my blogs…
Thanks for the fix! You’re totally Shibby!
Thanks a lot for this fix! 🙂
Dude you are great! You fixed my problem!!!
e…Dude,I did as what you said,seems didnt work…I should figure it out“
Comments are closed.