• Skip to main content
  • Skip to primary sidebar

Digital Maestro

Harmonizing Your Online Strategy

  • Home
  • About
  • Work With Us
    • Coaching
      • One-on-One Coaching
    • Services
      • Set Up Services
      • Website Maintenance
  • Products
    • WPICA
    • WP Security Help
  • Blog
    • Affiliate Marketing
    • Plugins
    • Business
  • Resources
    • Registrar
    • Hosting
  • Contact

Dec 16 2012

WordPress 3.5 Sharebar: How To Fix the Broken Code

WordPress35-Sharebar-errorWordPress v3.5 was recently released – if you had the social media plugin, Sharebar installed, you noticed that after upgrading you received an error on your website. UGH! Don’t you hate that?

The cause of this error is not that WordPress v3.5 broke something, but it was a result of extra security added to the underlying software of WordPress. In an effort to reduce the vulnerabilities of WP, additional coding was required to enhance the security process. In fact, this is a good thing.

However, good things sometimes go bad 🙁 Well, not necessarily bad… here is what happened in non-techie terms. A part of the code for WP required some information to be sent to it. With the upgrade to version 3.5 it now requires 2 pieces of information. Technically, these are known as parameters. There are now 2 parameters that are required, however, the old/current version of Sharebar has not yet been updated. It is only sending 1 parameter.

The result is that you now get the ugly looking message on your site that looks something like this:

 

WordPress 3.5 Sharebar plugin fix

Unfortunately, at the time of this writing, there is no update from the creators of Sharbar to work with WordPress 3.5. If you can live without it, you can deactivate the plugin so this error does not show up on your site. In time, I am sure an update that fixes this will officially be published.

Now, if you REALLY want to have this on your site, there is a way to fix it. Best of all, it is not too difficult!

Step 1: BACKUP your site completely! I use WPTwin. You want a backup in the event you do something really bad.

Step 2. Log into your Dashboard and click on the Plugins > Editor. We are going to edit the code for the plugin.

Step 3: At the top of this page on the right, select ShareBar from the list of plugins.

WordPress35-Sharebar-Fix

Step 4. Press CTRL F (or Command F on a Mac) – we want to FIND the lines of code that are bad. Search for the lines that contains:

$results = $wpdb->get_results($wpdb->prepare

You will find it on Line 112  (although they are not numbered!) – the full line looks like this:

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

You want to change it to be:

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

Notice the only difference is the COMMA and the word null  are added. You need to add that to both lines.

Once you change that line, press CTRL F (or Command F on a Mac) again to find the second occurrence of this line.  You should find it on line 124. Add the same COMMA and the word null.

With both lines changed, click the Update  File button and you should be all set! No more ugly error messages will be displayed!

Written by Paul · Categorized: Plugins · Tagged: Sharebar

Reader Interactions

Comments

  1. Laurent says

    January 8, 2013 at 8:57 am

    Thanks !!!

    Reply

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

UpCity: Best of New Jersey

UpCity Best of New Jersey

Proud Member

Recent Posts

  • QR Codes Aren’t Dead — You’re Just Using Them Wrong
  • Your Next Hire Might Be an AI Agent: How Local Businesses Are Automating Customer Service in 2025
  • The Review Whisperer: How to Get More 5-Stars Without Begging or Bribing
  • Google’s AI Overviews Are Stealing Your Clicks — Here’s How to Fight Back
  • What Your Landscaping Business Might Be Missing Online (And How to Fix It)

WordPress Topics

  • Affiliate Marketing
  • Blogging Category
  • Business Building
  • Coaching Category
  • General
  • List Building
  • Marketing
  • Plugins
  • Resources
  • SEO
  • Services
  • Social Media
  • Themes
  • Traffic
  • Uncategorized
  • Video Subscription
  • Webinar
  • WordPress Online Strategy

Missinglettr

Copyright © 2025 · Digital Maestro · Disclaimer · Privacy Policy · Terms of Service · Accessibility · Stay Awesome!