[resolved] upgrade error (4 posts)

  1. Mvd
    Posted 2 years 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
    Posted 2 years ago #


    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?


  3. Robin W
    bbPress.org Moderator
    Posted 2 years 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


  4. Mvd
    Posted 2 years 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

Topic Closed

This topic has been closed to new replies.

About this Topic