WordPress.org

Ready to get started?Download WordPress

Forums

Sharebar
Error with WordPress 3.5 (40 posts)

  1. joshmcnair
    Member
    Posted 1 year ago #

    I am getting this error on all posts when I updated to wordpress 3.5

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/68/8824068/html/opadventureteamcom/wp-content/plugins/sharebar/sharebar.php on line 112 and defined in /home/content/68/8824068/html/opadventureteamcom/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/68/8824068/html/opadventureteamcom/wp-content/plugins/sharebar/sharebar.php on line 124 and defined in /home/content/68/8824068/html/opadventureteamcom/wp-includes/wp-db.php on line 990

    http://wordpress.org/extend/plugins/sharebar/

  2. kvnsmooth
    Member
    Posted 1 year ago #

    I am also getting this error. I KNEW I shouldn't have upgraded my wordpress installation yet.

    Any fix for this yet?!? This error is showing up on all my post pages!

  3. Cy Ball
    Member
    Posted 1 year ago #

    I am also getting this error on all pages including admin. Please help us...

    http://cyrilfb.com

  4. auckand
    Member
    Posted 1 year ago #

    I have the same error using the Sharebar plugin. Until the developers update their plugins try this in your function.php

    ini_set( 'display_errors', false );
    error_reporting( 0 );

    It stops error mesages and once the plugin devs update- just remove the code.

    Worked over at http://www.outdoorphotography.co.nz/

  5. Cy Ball
    Member
    Posted 1 year ago #

    I have restored my site from backup. I could not leave it with those errors showing.

  6. Cy Ball
    Member
    Posted 1 year ago #

    sorry, this is the error I was getting. It is different.

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/76/8978276/html/wp-content/plugins/digiproveblog/CopyrightProof.php on line 810 and defined in /home/content/76/8978276/html/wp-includes/wp-db.php on line 990

    It cannot be viewed now because I restored from backup.

    http://cyrilfb.com

  7. e3mobile
    Member
    Posted 1 year ago #

    Hi All,

    I had the same problem, I have a quick fix, not sure if its the right way but it seems to of worked for me. Edit the following file, sharebar.php

    On Lines 112 and 124, change the following lines of code from this:

    Line 112
    $results =$wpdb->get_results($wpdb->prepare("SELECT * FROM ".$wpdb->prefix."sharebar WHERE enabled=1 ORDER BY position, id ASC")); $str .= "\n";

    to this

    $results =$wpdb->get_results($wpdb->prepare("SELECT * FROM ".$wpdb->prefix."sharebar WHERE enabled=1 ORDER BY position, id ASC", null)); $str .= "\n";

    Line 124

    From this

    ` $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".$wpdb->prefix."sharebar WHERE enabled=1 ORDER BY position, id ASC")); $str .= "\n";
    `

    to this

    $results = $wpdb->get_results($wpdb->prepare("SELECT * FROM ".$wpdb->prefix."sharebar WHERE enabled=1 ORDER BY position, id ASC", null)); $str .= "\n";

    You may or may not need to edit line 124 depending on your position...as I say its a quick fix and its worked for me... hope this helps someone...

  8. kvnsmooth
    Member
    Posted 1 year ago #

    We shouldn't have to change the code in our themes to get around a bug in a plugin. My "workaround" for now at least was to disable the sharebar. If they can't fix the sharebar plugin soon enough, there are plenty of other sharebars out there.

  9. dhnaves
    Member
    Posted 1 year ago #

    e3mobile...thanks for adding in the null for the additional argument, (worked just fine!) the sharebar author will probably use your code to patch the plugin. =)

    kvnsmooth, feel your pain, but remember wp 3.5 was *just* released and most of these hard working plugin authors don't even know what the wp devs are adding (and can't see the probs until they occur) they are nice enough to give us their plugins for free. so, probably best to have juuuuuuust a bit more patience.

  10. archondigital
    Member
    Posted 1 year ago #

    e3mobile, thanks for the quick fix. I encountered the same error and applied your solution. Everything works fine now. I hope the plugin author would release an official update soon.

  11. kvnsmooth
    Member
    Posted 1 year ago #

    Yeah you are right, I'm being a little too hard on them. I should have known better than to immediately upgrade. Lots of plugins that are used a lot were had updates immediately. So I assumed developers have had early access to 3.5. Doesn't mean they actively were working with it though. Looks like I have to stick to either paid plugins or ones that are under active development.

  12. Drinks
    Member
    Posted 1 year ago #

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/resonate/public_html/wp-content/plugins/sharebar/sharebar.php on line 112 and defined in /home/resonate/public_html/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/resonate/public_html/wp-content/plugins/sharebar/sharebar.php on line 124 and defined in /home/resonate/public_html/wp-includes/wp-db.php on line 990
    Neither changing the functions.php or editing the sharebar.php lines 112 or 124 have worked. :( Does anybody else have any suggestions?

  13. Pyo_
    Member
    Posted 1 year ago #

    e3mobile, thank you for the fix. I applied it on my blog (Pexiweb.be) and it works fine.

  14. pookywiss
    Member
    Posted 1 year ago #

    Thanks so much for this fix. Didn't break till I switched to a shiny new theme and I was gutted when I saw the error but works fine now :-)

  15. lrsv5
    Member
    Posted 1 year ago #

    THANKS A LOT e3mobile!! It works for me.

  16. archiseek
    Member
    Posted 1 year ago #

    Nice work. Worked lovely.

  17. yaaqub
    Member
    Posted 1 year ago #

    @drinks ... the code change didn't work me too, but when I deactivated the plugin and activated it back, it worked. (also if you have minify settings / caching plugins installed, you may need to clear cache).

    Hope that helps.

  18. eggreef
    Member
    Posted 1 year ago #

    Thanks e3mobile. It worked here as well.

    http://www.eggreef.com

  19. alicari
    Member
    Posted 1 year ago #

    I've a problem with my wordpress 3.5

    when i need to put on the post some element of my gallery, the button doesnt work!!!!

    Somebody can help me? Thanks!

  20. MCAllinder
    Member
    Posted 1 year ago #

    Thanks e3mobile, worked perfectly!

  21. Shan
    Member
    Posted 1 year ago #

    Yep, that fix worked for me, too. Just make sure you copy ALL the code. Don't accidentally leave out a semi colon or you'll get a fatal error.

  22. Digitalcashcrop
    Member
    Posted 1 year ago #

    e3mobile that worked just fine for me @ http://socialbarrel.com. The only thing was the line's you mentioned were different.

    thanks e3.

  23. WPJEDI
    Member
    Posted 1 year ago #

    @e3mobile Great tip. You also have to do this for sharebar-admin though or it will break in the back-end

  24. bharatjai
    Member
    Posted 1 year ago #

    @e3mobile... Thanks for your tips. It really worked for me in my website http://www.ichinda.co.in.

  25. elpaso411
    Member
    Posted 1 year ago #

    worked for me! thanks e3mobile!

  26. johnatthebar
    Member
    Posted 1 year ago #

    e3mobile for president!

  27. rclark
    Member
    Posted 1 year ago #

    The fix from 3r mobile worked for me on the latest version on http://www.luxurybranded.com after getting errors.

  28. jshare
    Member
    Posted 1 year ago #

    Thanks e3mobile, worked for me too

  29. Michael Musgrove
    Member
    Posted 1 year ago #

    Thanks for the quick fix @e3mobile. Always nice when something works!

  30. newcitiesfoundation
    Member
    Posted 1 year ago #

    Thanks you very much for the fix!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.