• After my update to WP 3.5 i get this error:
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/www/loppekur.dk/wp-content/plugins/wp-compare-tables/wp-compare-tables-frontend.php on line 100 and defined in /home/www/loppekur.dk/wp-includes/wp-db.php on line 990
    It is all over the front page of loppekur.dk so fast help is greatly appreciated.
    Best regards
    Simon Pedersen

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator t-p

    (@t-p)

    try deactivating wp-compare-tables plugin.

    Fastest thing to do is go edit your wp-config.php changing the define for WP_DEBUG to false so that warnings are not showing anymore; or just deactivating that plugin and not use it

    /mod/ Is it possible to attach this post to the appropriate forum for the support page to this plugin?

    Thread Starter loppekur

    (@loppekur)

    Thanks for you quick replys guys!
    The compare table plugin plays a huge part on my site so disable is a “no go” since it will remove all my affiliate links. Seems like the WP_DEBUG is already set to false:

    */
    define('WP_DEBUG', false);

    Any other ways?

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    First, turn off errors being displayed by adding this to your wp-config.php file:

    @ini_set('display_errors', 0);

    Next, contact the author of that plugin, and tell them to read this to fix the plugin:

    PHP Warning: Missing argument 2 for wpdb::prepare()

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    /mod/ Is it possible to attach this post to the appropriate forum for the support page to this plugin?

    No. The post has to be made from the plugin’s support page to do that.

    Open up the plugins/wp-compare-tables/wp-compare-tables-frontend.php file via FTP and search for this:

    $value = $wpdb->get_var($wpdb->prepare("
    										SELECT
    											val_value
    										FROM
    											".$wpdb->prefix.WP_COMPARE_TABLES_TABLE_VALUES."
    										WHERE
    												val_table = '".$id."'
    											AND
    												val_col = '".$column->col_id."'
    											AND
    												val_row = '".$row->row_id."'
    										"));

    then change it to this:

    $value = $wpdb->get_var($wpdb->prepare("
    										SELECT
    											val_value
    										FROM
    											%s
    										WHERE
    												val_table = '%s'
    											AND
    												val_col = '%d'
    											AND
    												val_row = '%d'
    										",$wpdb->prefix.WP_COMPARE_TABLES_TABLE_VALUES,$id,$column->col_id,$row->row_id));

    and see what happens 😉 apologize for the bad look of coding there, that’s how it is in his source and I just copy pasted ;/

    Thread Starter loppekur

    (@loppekur)

    …and see what happens 😉

    And it fixes it! Thank you very much – saved my day! I´ll write the author and direct him to the above link.
    Thanks again guys!

    This issue has now been resolved in version 1.0.5. Thanks for using this plugin!

    http://wordpress.org/extend/plugins/wp-compare-tables/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Troubles after update to 3.5’ is closed to new replies.