WordPress 2.5 Is Live And Wild (Plus Popularity Contest Notes)

Update April 5th: Download patched version of plugin here.. Note you’ll still need to make the database changes if you don’t have the tables already in place.

The long awaited WordPress 2.5 has been released. In fairness, some of the advances in WP2.5 are as great that it could well have been labelled WordPress 3.0 but who’s to argue with version numbers.

Before rolling out upgrades across a number of my own blogs and blogs I manage for others, I’ve been doing the precautionary thing of testing WP2.5 locally with a variety of homemade themes and some of my regular plugins.

Plugin Issues

So far I’ve only found an issue with with Alex King‘s Popularity Contest plugin – if you try to activate the plugin under WP2.5, for the moment, you’ll see it triggers a fatal error. This can be fixed as outlined here

Open popularity-contest.php and scroll down to line 59. Replace require(’../../wp-blog-header.php’); with require(’../wp-blog-header.php’);

However, in running the plugin locally I found that after making the changes in order to get the plugin to activate, it wouldn’t create the two tables needed in order to run, so these had to be entered manually (via phpMyAdmin). To create the tables, you’ll need to run the following SQL queries.

CREATE TABLE IF NOT EXISTS `PREFIX_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 `PREFIX_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL
) ENGINE=MyISAM;

Note that PREFIX refers to your WordPress table prefix, in most common cases it is simply wp_ unless you’ve got multiple copies of WordPress running in the same database.

Initial Impression

Love it. I downloaded the latest SVN version only yesterday in the office though never got around to playing with it (of course not knowing the full release would hit today). The admin interface is much smoother, I’m liking the customisable dashboard (I used to edit the admin index and strip out everything bar the ‘write a post’ link and stats) and the overall colour scheme is much more appealing. I was never a visual editor user before (and won’t change in a hurry), but I do like the changes they’ve made, including the full screen option for those intensive blogging moments.

I’ll have a full play around with the gallery / media functions yet as well as making sure my other preferred plugins (sitemaps, podpress etc.) are all up to working order before doing a widescale upgrade.

You can download the latest version of WordPress 2.5 right here. You can also see a full list of new features right here.

Comments

75 responses to “WordPress 2.5 Is Live And Wild (Plus Popularity Contest Notes)”

  1. Darren Avatar

    The only plugin error I’ve had so far is from the ‘Disable Visual Editor’ plugin, which I can live without. Smooth running so far.

    I wouldn’t go so far as to call it 3.0, but the interface is much more user friendly. First impressions are good.

  2. Ken McGuire Avatar

    Ah handy. Reckon I’ll just go all out and update kenmc.com before the weekend is out, if it breaks just fix it while it’s live 🙂

    Also, you know how HARD it is to write a six-word memoir? I’ll get there too…

    Can’t you just untick the visual editor option anyway when you edit your user profile, without the need for a plugin?

  3. Darren Avatar

    Actually, yes! When I first installed WP, I was having editor problems (connected to the theme I was using) that the DVE plugin fixed. I guess they’ve been solved now.

    The Six word thing is very tough, but worth thinking about. Good luck with it.

  4. […] TechCrunch, Mashable!, Ken McGuire On The Web, Joseph Scott’s Blog, Bb’s RealTech, TechWinter, Elliott C. Back, A Fool’s […]

  5. […] de ler num blog a dica para tornar o plugin popularity contest compatível com o novo WordPress […]

  6. […] para 2.5 eu imediatamente percebi que ele havia provocado uma falha geral e não pôde ser ativado. Felizmente encontrei a solução: Editar a linha 59 do arquivo do plugin, substituindo esse trecho de código: PLAIN TEXT […]

  7. Conor O'Neill Avatar

    It looks like many plugins which try to interact with the blogpost writing screen will break due to its redesign.

    We were about to launch V2 of the LouderVoice plugin 2 weeks ago but discovered it didn’t work with the 2.5 beta. Have final version now and will release after a bit of testing.

  8. Ken McGuire Avatar

    The new plugin arrives? Excellent 🙂

  9. Ed Avatar
    Ed

    Hi there. Just wanted to say thanks for the fix for Popularity Contest. I upgraded myself into quite a spot when I took a production site to 2.5 and realized PC was giving me issues. Worked like a charm!

  10. Ken McGuire Avatar

    Ed, no worries. Glad I could help.

  11. […] Contest 1.3b の組合せは試していないので、ここから先は未確認ですが、Ken McGuire のブログを見ていると手動でこれを作成しているようです。 CREATE TABLE IF […]

  12. […] Another issue that was experienced shortly after the upgrade was the error that appeared when trying to reactivate Alex King’s Popularity Contest Plugin.  Luckily the solution was only a Google search away and the problem was soon resolved after visiting Ken McGuire’s blog. […]

  13. […] 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. […]

  14. […] until WordPress 2.3.3. – You should probably be able to take this plugin and make the fix specified here for it to be able to work on WordPress […]

  15. […] Edit 2: Wie man sieht, ließ sich das Popularity Contest Plugin doch noch zu einer Mitarbeit mit WordPress 2.5 überreden. Die Lösung findet sich hier. […]

  16. […] have tried hard to fix this problem with the help of this post, unfortunately I couldn’t make it although I have followed all the steps from this […]

  17. […] abwarten, das Alex King recht schnell noch ein Update nachschiebt. In der Zwischenzeit kann man nur kleinere Anpassungen von anderen Benutzern aus den Kommentaren zum Plugin […]

  18. […] Click here for more information. Tags: admin panel, popularity contest, WordPress, wordpress plugins […]

  19. […] I hope you’ve enjoyed the articles you’ve found and have been reading – plus I hope the assistance with the Popularity Contest plugin has helped, though Alex King will be releasing a fully WP compatible version […]

  20. David Avatar

    I did the fix precisely as you advised in Popularity-Content and still got a fatal error. Any advice?

  21. Ken McGuire Avatar

    David, I’m posting the patched plugin (that I know is working) as an update to this post in the next few minutes. If you want to grab that one, be my guest. After that you just need to have the tables in your database (making sure you change the word PREFIX to whatever your WordPress table prefix is).

  22. cuzzy Avatar

    way to complicated, I just think I will stop using popularity contest even though it was so helpful.

    wP 2.5 really sucks

  23. […] 如果担心有问题就照这篇文章的方法来处理 […]

  24. […] The following plugins are “must haves” in my book and all have been tested for WordPress 2.5 compatibility. For those of you interested in Alex King’s Popularity Contest, I have blogged elsewhere on patching it to WP2.5 status. […]

  25. Mike Haydon Avatar

    Thanks so much! I had no problems with one of my blogs when I upgraded to 2.5. Didn’t need to update as you said above (maybe because I forgot to disable the plugins til after I had started the upgrade!). I put this plugin on a new blog and had all the issues you said. I tried changing the 59th line (as was suggested elsewhere), but that didn’t work. It wasn’t until I ran the mySQL query you outlined above that I finally got rid of the “fatal error” msg.

    Thanks for taking the time to figure this out. I had thought it was my template clashing. SO glad I found this post or I would have wasted so much time barking up the wrong tree.

  26. Ken McGuire Avatar

    @Mike

    Glad to be of assistance 🙂

  27. […] you are activating Popularity Contest for the first time, go to Ken McGuire’s blog and follow his instructions on setting up a table in […]

  28. […] the plugin patch here and install it in your /plugins/popularity-contest/ folder. Or visit this blog for more details. Hope it helps. Feel free to contact me if you need any further clarification. […]

  29. Charity Avatar

    Excellent! This fix worked flawlessly for me and is much appreciated. You just saved me a ton of time agonizing over a problem that I couldn’t afford to wait on the author for and had no idea how to fix myself. Many thanks.

  30. […] it went bonkers and kept giving Fatal Error message. So off I go to search and found a help in Ken’s web. In his site, you can either download his latest patched file or rather you can just modify the […]

  31. Popularity Contestのバグ原因判明…

    Popularity Contest 1.3b3 のバグは、WordPress2.5になって、プラグインのアクティベート作法が変わったためと判明しました。
    ◆修正箇所
    popularity-contest.php の1536行目付近のif文を修正します。

    //if ……

  32. Kevin Paquet Avatar

    Really helped out, a lot. Especially the patch for the pop plugin, thanks!

  33. khaled Avatar

    same problem

    i download the Download patched version of plugin here..

    and when i try to active the plug

    they give me

    Plugin could not be activated because it triggered a fatal error.

    can you help me please ….

  34. Ken McGuire Avatar

    @khaled This is quite possibly due to the database error. Can you confirm that you had popularity contest installed and working PRIOR to the WordPress 2.5 upgrade? If not, you’ll need to create the database tables as outlined above in order to make it work.

  35. Cash Spark Avatar

    Worked like a charm!

    Just be sure to change the word PREFIX to wp_ (it appears twice in the query) otherwise it won’t work. You just log into your hosting account, click on MySQL, then enter into phpMyadmin, click on SQL and copy and paste the text in the original post above, change “prefix” to wp_ and click “GO”. It will automatically create the tables for you.

    Then, go back into your WordPress admin panel and activate the plugin.

    Works perfectly =)

    Thanks for the great post, Kenmc!

  36. […] questo plugin con WordPress 2.5.x (a proposito, aggiornate alla 2.5.1!) trovate la soluzione in questo post, anche se la procedura è sconsigliata ai principianti (richiede la modifica di un file php e […]

  37. Wiliam Avatar

    Thank You for the Popularity Contest plugin patched. 😉

  38. Oliver Avatar
    Oliver

    When trying to run the query i get this error message,
    ) ENGINE = MYISAM ; # MySQL returned an empty result set (i.e. zero rows).

    Does anyone know what i need to do or change?

  39. Ryan Avatar
    Ryan

    Thanks for the info. Initially I tried your instructions for a new install of WordPress 2.5.1, but still got the fatal error (even with creating the two tables). Eventually I discovered that I had to leave the “PREFIX_” completely out of the table names in order to get the plugin to activate. In other words, the two tables created in my WordPress database (named “wp01”) were:

    ak_popularity
    ak_popularity_options

    Thanks again for getting me on the right track!

  40. Oliver Avatar
    Oliver

    Thanks Ryan. Followed you advice and after a week of trying i finally got it working.

  41. Luis Narvaez Avatar

    Thanks a lot!! This was very a helpful tip, worked like a charm for me.

  42. jason Avatar
    jason

    Hi Ken

    I’ve just installed WP 2.51 and installed the patched version of Popularity Contest.

    If prior to WP 2.51, the tables didn’t have to be manually created, I was just wondering why after WP 2.51 we have to manually create them?

    I have to say, I’m not to clear on how to run those sql commands and will need to learn this a bit better.

    Thanks

  43. jive Avatar

    Thanks for the fix 🙂

  44. bhina Avatar

    Cooolllll…. thanks, such a useful post 😀

  45. Ryan Avatar

    Thank you very much for the fix! Worked like a charm!

    I was irritated that the owner’s website does not post this fix information.

  46. […] have to create some database tables first. Extended instructions on how to manage it can be found here. Tags: blog, internet, web, web design, wordpress, www Posted by Nikos Typpz Filed in General, […]

  47. […] You can choose to create the database manually like Ken Mcquire explains in this article. […]

  48. arran strider Avatar

    to anybody who is having difficulties or finding it hard – persist !
    it WILL be worth it

  49. vamsi Avatar

    Thanks buddy, solved my problem.

  50. […] This will solve the problem of the ability to activate AlexKing’s Popularity Contest. However, that’s not all, for a farther insight on what is happening in the background(activating it doesn’t mean it will work properly), view this ingenious solution here. […]

  51. BoB Avatar
    BoB

    I don’t understand this shit, how will I make it work????

  52. k235 Avatar
    k235

    works! thx.

  53. Marco Luthe Avatar

    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

  54. Money Off Shop Avatar

    Yay – it worked a treat for me on my site – http://www.ddwt.co.uk

    Many thanks Ken for the info – much appreciated 🙂

  55. miCRoSCoPiC^eaRthLinG Avatar

    Why bother changing it to the likes of require(’../wp-blog-header.php’); OR require(’../somedir/wp-blog-header.php’); ? I’ve read thousands of complaints – it worked for some, it didn’t for others. The relative path scheme may not always work out correctly.

    If you ask me, the best option would be to use the ABSPATH variable (defined in wp-config.php) and concatenate the rest of the string to it.

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

    This should work out without a hitch for anyone and everyone…

    Cheers,
    m^e

  56. Nick Wilsdon Avatar

    Thanks for the plugin fix Ken – it worked like a charm.

  57. […] you updating Alex King’s Popularity Contest plugin? Then you can fix this error by applying this patch and modify your database for popularity […]

  58. […] a bit more involved, but still doable. Please note, this fix isn’t my own. I learned about it here. I’ve rewritten the steps to hopefully provide a clear step-by-step account of the process […]

  59. Tyler of TYsTIPS.com Avatar

    I’ve posted a step-by-step tutorial (using screen shots of the steps above) on my website. For those of you who are intimidated by the idea of modifying your database, check out my post. It may help ease your mind. The steps really aren’t that hard.

    http://tystips.com/archives/35/how2-get-popularity-contest-plugin-working-in-wordpress-251/

    If was able to get Popularity Contest to work on WordPress 2.5.1 – you can too! 🙂

  60. Justin Avatar

    Your fix worked like a charm man, thanks!

  61. […] “Fatal Error trying to activate this plugin”. So I googled the issue and finally find this site, in which it is well explained that to make things work you have […]

  62. konus Avatar

    Thnx dude!

  63. […] в тени. Но в процессе серфинга, наткнулся на блог Ken McGuire, где он предложил свой способ решения данной проблемы, […]

  64. […] no problem except only for Popularity contest plugin by Alex King wherein the solution is found by KenMc, the only thing it’s a bit technical for a noobz like me so I rather wait for Alex King to […]

  65. KcL Avatar

    I got this problem:
    Table ‘rh_2476809_kclkcl_wordpress.wp_ak_popularity_options’ doesn’t exist on line: 218

    I’ve queried the database, still not working..
    Even with that patched php, and unpatched php doesnt work too!

    http://www.kclkcl.co.cc

  66. Ken McGuire Avatar

    @KcL

    Have you the tables set up for your plugin and if not, did you run the sql above, replacing the table prefix with that of your own?

  67. Rohit Khirapate Avatar

    Helped. Thanks a ton dude :0

  68. shidiq Avatar

    a nice solution…thank…its work!

  69. Amit Chougule Avatar

    i have installed plugin …its activated but i am getting error as ….
    Parse error: syntax error, unexpected $end in C:\wamp\www\wordpress\wp-content\themes\news-cms\index.php on line 156

    while applying theme …..

    please reply asap…..

    thank you .
    Amit Chougule.

  70. Dean Saliba Avatar

    Worked a treat! 🙂

  71. Prabhakar Kasi Avatar

    Thanks for this blog. I finally activated the popularity plugin.

  72. […] fix this issue you can choose to create the database manually like Ken McGuire explains using the following […]

Leave a Reply

Your email address will not be published. Required fields are marked *