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.
Fixing Problem #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‘.
Fixing Problem #2
You can choose to create the database manually like Ken McGuire explains in this article.
That works, but it’s a little complicated, so I came up with my own solution.
All you need to do is open the ‘popularity-contest.php’ file go down to the line 1528 and change this:
if (isset($_GET['activate']) && $_GET['activate'] == 'true') {
for this:
if (isset($_GET['action']) && $_GET['action'] == 'activate') {
You can also download the modified plugin:
Popularity Contest for WordPress 2.5
That’s it, you shouldn’t have any other problems now. Enjoy!
Update:
As Marco pointed out, the solution to the first problem could fill your error_log with warning messages. To fix that change the “require(‘../wp-blog-header.php’);” for:
@require('../wp-blog-header.php');
Great tip, I have been looking for a few days to get my plugin sorted and the second part of this tut, sorted it. thanks.
Thanks, solved my problem!
Thanks bro it works like a charm, may you have long life with happiness and joy.
thanks i download the patch and it is work done
Thanks for your work on this. I’ve been working on popularity contest for two days with no luck. Your patch did the trick.
Hi,
I am also very interested in getting Popularity Contest to work under 2.5.1, because obviously and unfortunately, Alex King hasn’t presented a new version yet.
But considering your modifications:
what about this comment and Alex’s answer?
http://alexking.org/blog/2008/03/30/wordpress-25-plugin-compatibility#comment-62323
@Marco Luthe: I hadn’t noticed those errors, thanks for the heads up. I’ve been playing around with the plugin for a little while and I noticed the errors only come up when loading pages in the admin section (where the plugin doesn’t really need that require statement, that’s why the error given is just a warning by the way). So… I would add a @ right before the require, to avoid the warnings and hope that Alex King will release the official 2.5 compatible version.
[…] Contest floating around out there. I tried 4 of them before I found one that worked. The wpguy cracked it and shows you how to patch it yourself. He also has a ready patched version for […]
Thank you for solving this problem — It worked fantastic!!!
[…] luckily i found the accurate way to fix the problem in Popularity contest plugin and WordPress 2.5 – from WP Guy. He modified the plugin and make the modified plugin of popularity contest of Alex King available […]
Ahhh — relief at last! This one was really stressing me out thanks for the fix.
[…] if you are installing the plugin for the first time, you will still get fatal error messages. This post by Wessley Roche points out a few quick fixes for a couple of lines, if you haven’t the 2 tables of the plugin […]
[…] able to find an even easier way of getting around this compatibility issue. Head on over to WPGuy for the easy […]
[…] Contest plugin has not been updated for WP 2.5 and above yet. There is a fix for it though here) and Nick Momrik’s Most […]
Wow.. it’s working like a charm!. Thank you indeed WPGuy!
Cheers!
[…] ce n’est peut être à la ligne 59 où il faut modifier légérement le code comme expliqué ici chez pguy.com . J’avoue que j’ai failli abandonner pour passer à autre chose, mais justement sur le […]
Awesome..thanks for putting this out there. It works great.
I was really racking my brain until I found this. Thanks again!
I have been trying to fix this all day, and I couldn’t figure it out…
You’re fix worked with line 1528….THANK YOU!!!!
Thank you, I almoste love you.
thanks a lot a got it working on one of my new blog. i really appreciate your effort and help.
THANKS SO MUCH!!!!!!!!! The “replacing the require field” trick didn’t work but the modified plugin worked for me.
Thank you!!!!!!!!!!!!!!!!!!!
[…] но и http://wpguy.com/tips/popularity-contest-plugin-compatibility-with-wordpress-25/. На обоих имеется ссылка на скачивание […]
[…] I did this I found The WP Guy has an updated plugin for download on his site which corrects the problem. The fix addresses both the direct to […]
It worked for me! yey, thanks so much!
I have several questions though
— is there a way to exclude a particular category and not show up on the list?
— how to add a date below the title link?
Any thoughts?
thank man
working
Popularity contest plugin and WordPress 2.5…
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….
[…] 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 […]
I was waiting to fix this issue for quite sometime. Thanks P7
I can get the plugin work on WP 2.5.
I use mandigo themes : http://www.onehertz.com/portfolio/wordpress/
THANKS!! Nothing else worked (tried 4 other “patched” versions!)… you da’ man!!
corewerkz
Hi. Just wanted to say thanks. The fixes posted did not work for me but your mod worked just fine! Many thanks for posting it.
Woowo!!! Works like charm, dude!!!
Thanks so much.
PS: If you have time to spare, can you help me with this:
http://wordpress.org/support/topic/181355?replies=5
Well, still did not work for me on a fresh 2.5.1 WP install…
i can’t get mine to work either. mine’s not installed on the root directory but i altered it to be: ‘../news/wp-blog-header.php’ and everything in between and it still pulls a Fatal Error.
i’m using WordPress version 2.5.1.
@Mike & Groonk: I’m sorry my solution doesn’t work for you. I’ll see if I can find out why it isn’t.
I tried the original solution and it didn’t work for me then I read about the complicated solution where you have to edit your own database tables but didn’t have a clue what they were talking about. I’m so glad you posted this solution, its quick simple and it works – what a lifesaver! I hope othe people can find this fix cos its taken me months to find a solution after reading the same fix over and over again on other peoples sites. Cheers Mate top work!
Thanks, for the best guideline how to fixed the error. I search more than 5hrs to solve the error. last I find-out your guideline and I currect within a min. your are realy grate.
Thank you very much! Worked like a charm. 🙂
You’re the man, Work like a charm to me. Thanks you very much.
Many thanks!! it work 🙂
Greetings from Italy
Thank you!
I did not go well, but was settled immediately.
I thank you very much.
[…] Marco pointed out, the solution to the first problem could fill your error_log with warning messages. To fix that […]
Brilliant! Thanks for rescuing one of my favorite plugins.
thanks for making this so easy, worked just right for me too
Excellent! Thx for your support with this. Again we can use a ‘popular’ plugin!
thanks it works for me! Great!
I’ve been looking for this for hours. Thanks man. You are a saviour!
Thanks soooo much for this fix! I must have tried every fix out there and nothing was working as I had a new install of WP… this worked like a charm!
Thanks a million!!!
Thanks! Now mine works!
Thanks a lot !!!!
[…] angeschmissen und nach einer Problemlösung gesucht. Schnell wurde ich beim WordPress Guy fündig. Er hat das Plugin etwas umgeschrieben, sodass es auch Fehlerfrei mit WordPress 2.5 und höher […]
Yeah. it worked, thanks that you found the solution and shared it with us.
[…] plugins re-activated successfully except for Alex’s Popularity Contest, which simply required changing one line of code to […]
Your the BEST!!!!!!! KEEP IT UP!!!!!
thaks a lot now it works !
You’re not the guy, YOU THE MAN ;D
[…] I’ve added the modified popularity contest plugin (Alex King’s original one still isn’t compatible with 2.6 but I hope he’ll update […]
Thanks Much, ur blog came like a savior to me.
Thanks again
Thanks for help! You are great!
Thanks from Finland.
Does this work on WordPress 2.6 also!? Thanks
Absolutely worked the first time. Thank you very very much. You rock for making this post. I bow down.
BIG THX!
Just saved me some time fixing this myself!
Ohhh ths is great I have been searching high and low for something like this.
[…] feed views, comments etc. As the original plugin gives a fatal error in WordPress 2.6, I used a hacked version which works […]
Hey 😀 😀 🙂
its finally working
thanks Man
well done
Hello,
Unfortunately, this has not fixed the problem for me. I did edit the popularity-contest.php file as indicated, and loaded it to wp-content/plugins. I then refreshed the plugins page in WP, but activating this plugin still gives me a fatal error.
I am running WP 2.6.
Hello,
I downloaded the modified plugin for WP 2.5 and installed that to my WP 2.6. Interestingly, this plugin works and I have been able to activate it.
@Conrad: Have you tried downloading the modified plugin?
I had use your method for my new WP blog and using Ikarus theme. Before this I had trouble with Popularity contest plugin but your tips is working. So, thank you very much Wessley.
Halim@akublogger.com
[…] How to fix the problem when activating Popularity Contest 1.3b3 returns, “Plugin could not be activated because it triggered a fatal error” in WordPress 2.6 ? The best solution by reading this post about Popularity Contest Plugin installation fixed. […]
[…] scaricarlo da qui tutto modificato Popularity Contest Plugin installation fixed […]
[…] a WP 2.6 site without any problems. If you have trouble activating it, there is a fix for it posted here. Your Most Popular Posts will appear at the top of the right sidebar in the tabbed navigation box […]
Your patched version fixed it right up. Thanks!
[…] но и http://wpguy.com/tips/popularity-contest-plugin-compatibility-with-wordpress-25/. На обоих имеется ссылка на скачивание […]
[…] WordPress Guy を見ると、popularity-contest.php を直接修正して解決しているようです。 – if (isset($_GET[‘activate’]) && $_GET[‘activate’] == ‘true’) { + if (isset($_GET[‘action’]) && $_GET[‘action’] == ‘activate’) { […]
I thank you so much for the great modification! now it works! GREAT!!!
[…] hab ich mir das alles nicht selber ausgedacht, sondern mich durch die Anleitung von WP Guy schlauch gemacht. Auf diesem Weg, also Herzlichen […]
Hey mate
thanks for your help with this plugin. Took me a while to get around it, since I don’t know too much about php. Works great with the Ikarus Theme.
Cheers again
[…] 升級雖然順利,但打開首頁,卻沒有內容顯示。問題出在Category Visibility這個外掛上,關掉就沒事了。碰到的第二個問題是Popularity Contest引起的,網上找到了方法,照著修改了一下又解決了。 […]
finally working… thanks!!
[…] release 2.6. I have been trying to fix this more than 3 days, and finally I have downloaded the modified plugin by wpguy.com. It’s working like magic! Thanks to […]
Thank you very much. the new modified plugin works for my word press latest version. nice job..
[…] 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 […]
[…] Popularity contest plugin and WordPress 2.5 | WordPress Guy これだけで問題なく使えました。 […]
Thanks. God bless you!
It worked! Thanks so much. I was freaking out.
Thanks so much!
THANK YOU 🙂
[…] WP-related post: plugin qui permet d’afficher sous chaque article les articles qui peuvent avoir un rapport […]
Thanks for the update of this plug in.
I have activated the plugin and how to show it on my blog?
@Edy: Add the template tags to your theme. “akpc_the_popularity()” for example. Check the Popularity Contest settings page for more.
[…] Popularity Contest Update: WPGuy offers solution for this plugin’s error msg. Use the feature to make a “Top 50″ page. When you maked a post, put some of your […]
[…] luckily i found the accurate way to fix the problem in Popularity contest plugin and WordPress 2.5 – from WP Guy. He modified the plugin and make the modified plugin of popularity contest of Alex King available […]
Thanks for that (fix #2), been struggling with this one for a while, fix #1 seems to be easy to find but #2 hasn’t been.
Hello. I’ve a little problem since a few days with 1.3b3 on WP 2.6, it seems it just doesn’t count newer post anymore. The rankings are like frozen … Any idea what could have happened ? Everything was working fine and i suspect the problem is not related directly to the plugin, but have no idea where to look at.
thank wpGuy!
[…] Saat saya mengupgrade wordpress ke versi 2.6.2, plugin Popularity Contest menjadi error dan muncul pesan: Plugin could not be activated because it triggered a fatal error. Setelah search sana sini, ternyata banyak juga yang punya masalah sama. Solusi untuk error ini bisa di baca-baca disini dan disini. […]
Worked for me, thanks so much
Thanks, it works! (WP 2.6.2)
I’m on the verge of insanity.
I’ve upgraded to wordpress 2.6.2, and I used your tips and it still doesn’t work! It continues to say that there is a fatal error when I try to activate it.
Can you help me?
The 2 fixes work great! thanks for the help and this article it was simple and only took a few minutes. Great!
Using Version 2.6.2 on a new blog and worked like a charm.
Thanks for the quick fix.
Thanks so much for your help!! I don’t do any programming . However, your tips on getting this plug in to work i could handle. Thanks Again!
Chad
ohhhhhh man…
you are too goooooood..
i was looking for the fix quite long time…glad i able to use it now…
thanks man….
Hi,
Many thanks for the plugin. It solved the problem that I was having with the theme that I currently use.
I have a question/problem though which I hope someone can shed some light on:
On the WordPress dashboard, when I go and look at the Most Popular Posts part. The post that is my most popular is showing as having over 800 comments, when it actually only has 3….
My blog was recently hacked with a spam injection in my footer which I’ve now cleaned out and hopefully sorted. Could this be another hack?
I’ve searched the post with a googlebot spoofer and the searched the google cache, but I’m seeing nothing out of the ordinary….
Does anyone have any idea what is going on?
Dan.
Rock on! Thanks for the fix saved me a LOT of time.
thank you so much. I wish this was the first resource I found. It would have saved me some frustration.
Thanks for your Help
simply superb it saved ma lot of time of RND. Hats of to you bro.
Regards,
Sam.
Good job! I’ve made the same changes by myself and it didn’t worked, so I’ve downloaded your edition and now it’s fine! Thanks 🙂
Wes, thanks a million. It seems baffling that Alex King hasn’t yet taken notice of these issues, and correct them himself. As with framespotting above, I had tried to edit the plugin file myself with your suggested edits, and still received the error. It was only after downloading & installing your edition that it worked. The sidebar.php also need substantial tweaking to work with my instance of pearsonified.com’s Neoclassical Theme. Thanks again – I’ve subscribed to your feed!
I dunno how to thank, this is great
it works
Ohh god
you saved me bro
thanks
[…] If you’re running WordPress 2.5 then you might need to make some changes as I noted here. […]
Thanks very much, this worked for me!
i’ll try it all day long when the first time download it but error, and then i came here and find the solution.
that’s just too awesome man, great job and thank you very much 😀
regards and best wishes to you 🙂
THANK YOU! I have been pulling my hair out trying to fix this fatal error! I tried all the code fixes and none worked…but, alas, your fresh download file above did the trick! Thank you so much!
blessings,
Wendy
Hey. I found your site through WP forum. Thanks for the modified plugin. It works great. Thanks again!
Make sure to add this fix as well, which is taken from http://wordpress.org/support/topic/204168.
In /wp-content/plugins/popularity-contest/popularity-contest.php, change line 531 from:
SET pingback_views = pingback_views $action 1
to:
SET pingbacks = pingbacks $action 1
The Fixing Problem #2 workeds for me. Many thanks for your clever.
Thanks ..
really its working and it is very useful for me….
Thax mate ! It works ! 😉
thanks man!
it really worked… my respect
[…] of this plugin, with the latest release compatible up to WP 2.3. However, WordPress Guy has updated the plugin to work with WP 2.5 and beyond, keeping all those delicious stats at my fingertips. To easily […]
[…] Popularity contest plugin and WordPress 2.5:wordpress guy […]
Cheers for this. 🙂
Thank you for sharing this. Awesome share.. best luck to you 😀
Didnt work i did it manually and also used the mod version still get fatal arror and wordpress is install on root
I just look in my error log got errors for increase memory over the allowed limit. Since my host have php issues better ask them 🙂
WPGuy, thanks for this helpful article! I was commenting about this error on Popularity Contest official page but my comments never showed up.
You have my thanks.
[…] JQuery Tabbed sidebar, Popular posts tab require Alex Kings popularity contest plug-in […]
You da man!!!! Thank you so much for this, much appreciated as have been trying to get this plugin working for a few weeks on and off… Cheers!
How do I get to line 59. I opened up the popularity-contest.php and I do not see that line you refer to above.
require(‘../../wp-blog-header.php’);
I used NVU to open the file now what!
Just a little more basic explanation. I am using WP 2.7
Thank Kim
Maybe you’re using an older version of the plugin.
Anyway… I’d recommend that you download the modified version of the plugin (at the end of the post)
Hey, I just downloaded the modified program above and that fixed the fatal error. I was able to activated the plug for popularity-contest.
Now how do I get side bar.
Talk about finding a problem and fixing you..thank you so much I was about to move on to another wordpress theme with less headache.
But I like this one..thanks again.
View my finished blog at
http://www.MaverickMoneyBlog.com
Kim Dion
Blogger
Thank you!
It’s great to have this working on 2.7.
One issue I am having (and I see it works on THIS site). Is that it does not work on category pages. It only returns “none”.
There are plety of “ranked” posts in the categories that show up on the “Most Popular Posts” page, but it isn’t working in the sidebar.
Anyone else?
Try this.
[…] came along WordPress Guy, who not only released a version of the plugin that works, but also told users what he did to fix the original. A few other people have also done […]
Oh my gosh, it worked. Thank you for the fix!
this worked great and i appreciate the hard work you put into it.
[…] Popularity contest plugin and WordPress 2.5 (WordPress Guy) […]
Thanks for the concise fix… It would have taken some time to find the problem.
🙂
[…] ile ilgili geniş açıklamayı wpguy ‘ın blogunda […]
thank you so much!
[…] a WP 2.6 site without any problems. If you have trouble activating it, there is a fix for it posted here. Your Most Popular Posts will appear at the top of the right sidebar in the tabbed navigation box […]
[…] Paha lugu on see, et originaalne plugin töötab versiooniga 2.3 ja vanemad. Uuemate WordPress’i versioonide kasutajad peaksid kasutama seda modifikatsiooni. […]
[…] a WP 2.6 site without any problems. If you have trouble activating it, there is a fix for it posted here. Your Most Popular Posts will appear at the top of the right sidebar in the tabbed navigation box […]
You’re the man. After a million tries to fix this, yours was the solution, I’ll be sharing this like woah!
Nice work!
Grazie mille!!
It work…Many thanks!!
Your sir, are a god among men.
I’ve got it working, still to test it, but here goes! Thank you so much!
[…] Referencias: KenMcguire | WordPress Guy […]
[…] a WP 2.6 site without any problems. If you have trouble activating it, there is a fix for it posted here. Your Most Popular Posts will appear at the top of the right sidebar in the tabbed navigation box […]
[…] Exec PHP working. If you have fatal error using popularity post ( plugins by Alex King), go to this site to fix […]
Worked like a charm. Thank you so much! You’re a lifesaver! 🙂
Works perfectly, thanks a lot!
This is very helpful post and now my plugin is working. Thankyou……….
[…] habe jetzt Popularity Contest in einer abgewandelten Version installiert, weil auch bei mir die Original-Version beim Aktivieren einen fatalen Fehler erzeugte. […]
[…] Popularity contest plugin and WordPress 2.5 (WordPress Guy) […]
[…] can hook folks searching out there for your content. Alex-King’s Popularity Contest Update: WPGuy offers solution for this plugin’s error msg. Use the feature to make a “Top 50″ page. When you maked a post, put some of your […]
I have a huge of wordpress premium plugin. you can visit my site to download it
I have installed the already modified plugin and when I tried to activate it I recieved the folloeing error message:
“The plugin does not have a valid header.”
So Please can you help me out? I am using wp 2.8.6
[…] Contest (attention: utiliser cette version pour les versions de WordPress supérieures à la 2.5): le célèbre plugin classe vos billets en […]
This is very helpful post and now my plugin is working. Thankyou……….
Hi!
Can you tell me what I have to do to fix this size of image box, and of course how to insert image in it (Popularity Contest).
thanks
Dario
Hi,
When I install wp-o-matic plugins then show me an error message
Plugin could not be activated because it triggered a fatal error.
Fatal error: Cannot redeclare class WPOMatic in /home/favstock/public_html/wp-content/plugins/wp-o-matic/wpomatic.php on line 122
Please help me
[…] Popularity Contest 人気投稿記事を表示するプラグイン。Popularity Contest Optionsで各項目の評価数値(持ち点みたいな)を調整することで、自分のサイトに合ったランキングを構成できる。 […]
When I install wp-o-matic plugins it shows me an error message
Plugin could not be activated because it triggered a fatal error.
Fatal error: Cannot redeclare class WPOMatic in /home/favstock/public_html/wp-content/plugins/wp-o-matic/wpomatic.php on line 122
Please help
Wow…another amazing set of Great Information! Thank you very much for sharing these!
Happy New Year Pictures 2016
Thanks so much for writing such an interesting and passionate piece. It was a pleasure to read. I look forward to reading more of your articles.
Nice Article
Nice Working
wow!! i would visit this blog again and again for this..
i love to visit this blog very much
Nice post thanks for sharing.
Great Post….Thanks!!!!
Comments are closed.