Support » Plugin: SpeakUp! Email Petitions » error messages diplaying on actual post

  • hi
    This was working ok until this morning now I’m seeing this

    Missing argument 2 for wpdb::prepare(), called in /home/secondha/public_html/wp-content/plugins/speakup-email-petitions/includes/class.petition.php on line 53 and defined in /home/secondha/public_html/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/secondha/public_html/wp-content/plugins/speakup-email-petitions/includes/class.petition.php on line 71 and defined in /home/secondha/public_html/wp-includes/wp-db.php on line 990

    some advice would be great…

Viewing 12 replies - 1 through 12 (of 12 total)
  • Yes, I am facing the exact same issue. Any solutions?


    I had the same problem, it seams that WP changed the definition of the function wpdb::prepare() so you need to add an extra argument.
    In class.petition.php and class.signature.php i changed $query_results = $wpdb->get_results( $wpdb->prepare( $sql ) ); to $query_results = $wpdb->get_results( $wpdb->prepare( $sql, "" ) ); where ever it occur and voila the error messages are gone (errors will appear in admin panel aswell). I don’t know if this is the right way to fix it but it’s takes away the errors and the plugin seams work afterwards. I guess Kreg will fix this small bug soon but for now I hope this will help you.

    Good Luck

    Plugin Author Kreg Wallace


    Thanks, Vespasian!

    Yes, WordPress 3.5 added some new error messaging on the wpdb::prepare() function. I’ll look into this and try to get an update out soon.

    The messages don’t actually affect the performance of your site and everything in the plugin should still be working as before. If you simply want to hide error messages while waiting for the new update, you can place the following in your wp-config.php file:

    @ini_set('display_errors', 0);

    A little more info here

    Plugin Author Kreg Wallace


    Version 2.3.1 of the plugin has been released and should fix this problem.

    Updated the plugin and it fixed the problem…thank you so much for that…kind regards

    Thanks Kreg for saving us from potential nasty sql-injection.
    Also thanks for great plugin! 🙂

    hello again
    sorry but I now have another problem, the comments box no longer works on the two posts which have the petition, it works fine on all other posts, it was working until I upgraded to wp 3.5…any advice much appreciated
    kind regards

    Plugin Author Kreg Wallace


    @shwmae2, can you send a link the posts that aren’t working?

    so sorry…forgot . here it is

    I just checked again and the situation is the same, thank you for getting back to me
    kind regards

    Plugin Author Kreg Wallace


    Not sure why your blog comments aren’t working on that page. The browser doesn’t show any Javascript errors. It’s really hard to read the source code of your page because you are using WP-HTML-Compression which removes all the normal formatting that makes the code human-readable.

    You might try turning off some of the plugins you are using, like WP-HTML-Compression, WP-Super-Cache, and whatever is displaying the comment above the comment textarea as you type and see if things start working again.

    Thank you Kreg
    Tried what you suggested and no impact…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘error messages diplaying on actual post’ is closed to new replies.