WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] upgrade error (4 posts)

  1. Mvd
    Member
    Posted 10 months ago #

    Hi, I got the following error on my wordpress site after upgrading to 3.6.1:

    Warning: Missing argument 2 for wpdb::prepare(), called in mysite.com/public_html/wp-content/themes/timeline/functions.php on line 203 and defined in mysite.com/public_html/wp-includes/wp-db.php on line 992

    Anyone any idea?

    Help is greatly apreciated!!

  2. Mvd
    Member
    Posted 10 months ago #

    Hi,

    I found this snippet in my theme's functions.php:

    // enable comments on all wordpress posts:
    
    function enable_comments_for_all(){
        global $wpdb;
        $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET comment_status = 'open'")); // Enable comments
        $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET ping_status = 'open'")); // Enable trackbacks
    } enable_comments_for_all();

    I took it out and the error disapeared.
    Any one knows the answer on how to fix the snippet?

    Thanks

  3. Robin W
    Member
    Posted 10 months ago #

    You should query with the theme's support site, there may be a theme update needed. there is a version 2.2.1 which claims 3.6 compatibility

    http://themeforest.net/item/timeline-ecommerce-wordpress-theme/3366463

  4. Mvd
    Member
    Posted 10 months ago #

    I think this was a function that I put into the functions.php file myself and the link to the theme is another theme than mine, however thanks for the help!

    I'll mark this topic as resolved

Reply

You must log in to post.

About this Topic