WordPress.org

Ready to get started?Download WordPress

Forums

My Link Order
[resolved] Displays "missing argument" errors in sidebar on WP 3.5 (16 posts)

  1. IndigoJo
    Member
    Posted 1 year ago #

    I just upgraded to WordPress 3.5 and found that this plugin displays a list of errors in the sidebar above where the links are, like so:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/username/public_html/blog/wp-content/plugins/my-link-order/mylinkorder.php on line 666 and defined in /home/username/public_html/blog/wp-includes/wp-db.php on line 990

    http://wordpress.org/extend/plugins/my-link-order/

  2. carmelosantana
    Member
    Posted 1 year ago #

    Warning: Missing argument 2 for $wpdb::prepare().

    Try adding $args=null as second argument where has been used.

  3. IndigoJo
    Member
    Posted 1 year ago #

    Thanks. That made the problem go away.

  4. WhiteRockMike
    Member
    Posted 1 year ago #

    I hate to give away how little I know, but can you point me to where those changes need to be made. I know I have to edit mylinkorder.php. I just can't find where to do the editing.

    Thank you.

  5. albertordp
    Member
    Posted 1 year ago #

    I have the same error but on a theme, where did I put that code?

  6. ngocmanh
    Member
    Posted 1 year ago #

    same problems, help

  7. IndigoJo
    Member
    Posted 1 year ago #

    I just posted a fixed version to my own blog - you'll need to upload it to the plugins directory of your WP install (say blog/wp-content/plugins) and extract it and it'll start working:

    http://www.blogistan.co.uk/my-link-order-3.3.2.1.zip

  8. WhiteRockMike
    Member
    Posted 1 year ago #

    I went and installed the Advanced Code Editor plugin.

    This let me see the line numbers called out above.

    I changed line 666 from:

    $results = $wpdb->get_results($wpdb->prepare($query ));

    To:

    $results = $wpdb->get_results($wpdb->prepare($query, $args=null));

    It worked.

  9. WhiteRockMike
    Member
    Posted 1 year ago #

    Thanks IndigoJo, I appreciate the help.

  10. fireQuartz
    Member
    Posted 1 year ago #

    It's not that I don't trust you, IndigoJo ... but um ... does anyone know what happened to the original developer? And should we not wait for an "official" update?

  11. WpThemesPlanet
    Member
    Posted 1 year ago #

    Hello, I posted this in another thread, with same error but different plugin.

    There are lots of plugins affected by the new update.

    Just did a google search for "wp-includes/wp-db.php on line 990" and only list the sites in the last 24 hours, and already thousands of sites show up with problems in different plugins.

    So, I guess that probably 100+ plugins were affected by this update, and probably much more.

    Now, chaging so many plugins would take very very long.

    A Plugin developer told me in another thread the following:

    "We fixed it already in our plugin and it's a very easy fix. WordPress isn't doing anything wrong they simply changed a second argument in the prepare() function mandatory instead of optional."

    Any ideas how to fix this in every plugin?

  12. iamnotarapperispit
    Member
    Posted 1 year ago #

    Can you tell me where to put $args=null in my wp-db.php file?

  13. WpThemesPlanet
    Member
    Posted 1 year ago #

    To those asking, the user "carmelosantana" is probably referring to change this line:

    $results = $wpdb->get_results($wpdb->prepare($query));

    with this one:

    $results = $wpdb->get_results($wpdb->prepare($query, $args=null));

    But if you have question or you are not sure, I recommend asking the developer of the plugin. Don't take my advice in this topic as fact please, since I'm more into themes, rather than plugins.

    Thank you.

  14. iamnotarapperispit
    Member
    Posted 1 year ago #

    What I mean is where does it go in the wp-db.php file? The line you specified isnt in the php file

  15. WpThemesPlanet
    Member
    Posted 1 year ago #

    I would not edit the "wp-db.php" unless WordPress gives an official statement. That file is part of WordPress core.

    People above are talking about the plugin file of My Link Order, the PHP file inside the plugin.

  16. froman118
    Member
    Plugin Author

    Posted 1 year ago #

    Resolved in new version of plugin released last week.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic