WordPress.org

Ready to get started?Download WordPress

Forums

SpeakUp! Email Petitions
error messages diplaying on actual post (13 posts)

  1. shwmae2
    Member
    Posted 1 year ago #

    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...

    http://wordpress.org/extend/plugins/speakup-email-petitions/

  2. shwmae2
    Member
    Posted 1 year ago #

  3. Anshul Tewari
    Member
    Posted 1 year ago #

    Yes, I am facing the exact same issue. Any solutions?

  4. vespasian
    Member
    Posted 1 year ago #

    Hi!

    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

  5. Kreg Wallace
    Member
    Plugin Author

    Posted 1 year ago #

    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

  6. Kreg Wallace
    Member
    Plugin Author

    Posted 1 year ago #

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

  7. shwmae2
    Member
    Posted 1 year ago #

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

  8. vespasian
    Member
    Posted 1 year ago #

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

  9. shwmae2
    Member
    Posted 1 year ago #

    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

  10. Kreg Wallace
    Member
    Plugin Author

    Posted 1 year ago #

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

  11. shwmae2
    Member
    Posted 1 year ago #

    so sorry...forgot . here it is
    http://secondhandhorsestuff.com/shop/2012/12/05/let-us-horse-ride-on-the-welsh-coastal-path-petition/#respond

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

  12. Kreg Wallace
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  13. shwmae2
    Member
    Posted 1 year ago #

    Thank you Kreg
    Tried what you suggested and no impact...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic