WordPress.org

Support

Support » Plugins and Hacks » Category Icons Lite » [Resolved] Breaks admin panel since update to WP3.5

[Resolved] Breaks admin panel since update to WP3.5

  • I just installed the update of WordPress to 3.5, with following failure message:

    Warning: Missing argument 2 for wpdb::prepare(), called in /usr/www/users/hellav/weblog/wp-content/plugins/category-icons-lite/caticons-lite.class.php on line 231 and defined in /usr/www/users/hellav/weblog/wp-includes/wp-db.php on line 990

    After deactivating the plugin, everything is fine.

    It’s a pity, because I’d like to continue using the Category Icons Lite plugin!

    Regards, Hella

    http://wordpress.org/extend/plugins/category-icons-lite/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Change the 231 line from
    $results = $wpdb->get_results( $wpdb->prepare($query));
    to
    $results = $wpdb->get_results( $wpdb->prepare($query, $args=null ));
    Please note that this s temporary solution and will hide the error.
    All other functionality will work normally but when you will assign or change an image for category than it will show you error.
    Although image will be assigned to category and it will be displayed.

    The same error happens to my WP site after the update to 3.5.

    Thanks a lot Raj, your trick works fine.
    Do you think the error will be fixed soon?

    I’d like to continue using CIL plugin.

    I’ve got the same problem and after some research I found the explantion:
    here

    What I did is manual edit of caticons-lite.class.php and change few calls to wpdbp.prepare i.e.

    $post_meta = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_key = '".esc_sql($this->meta_key)."' AND meta_value=$cat_id"));

    would become:
    $post_meta = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_key = %s AND meta_value= %d", esc_sql($this->meta_key),$cat_id));

    So instead of concatenating esc_sql() to query I would pass it as parameter. I think there was 2 or 3 queries like that in whole php file. After that plugin works perfectly fine.

    It would be nice to have these solution implemented in a new version!

    Hello
    Draco, as I am new to WP
    Where do I have to insert that codes? Within the plugin or some php page of my theme?
    Thanks for your help

    Plugin Author submarine

    @submarine

    Hi,

    it should be resolved with WP 3.5.1.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Breaks admin panel since update to WP3.5’ is closed to new replies.
Skip to toolbar