WordPress.org

Ready to get started?Download WordPress

Forums

Category Icons Lite
[resolved] Breaks admin panel since update to WP3.5 (7 posts)

  1. come_paglia
    Member
    Posted 1 year ago #

    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/

  2. rajpreet
    Member
    Posted 1 year ago #

    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.

  3. 14nc310t
    Member
    Posted 1 year ago #

    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.

  4. draco@epf.pl
    Member
    Posted 1 year ago #

    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.

  5. 14nc310t
    Member
    Posted 1 year ago #

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

  6. tenzing013
    Member
    Posted 1 year ago #

    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

  7. submarine
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    it should be resolved with WP 3.5.1.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.