$query conflicting with other queries in the same page

function pre_get_posts( $query ){
    if(isset($query->getpostlist) && $query->getpostlist) {
        add_filter( 'posts_fields', 'postsetupFields', 20);    
    } else {
        remove_filter( 'posts_fields', 'postsetupFields', 20); 
    }
return $query;
}

function postsetupFields( $fields ){
    global $wpdb;
    $fields = "{$wpdb->posts}.ID";
    return $fields;
}
add_action( 'pre_get_posts', 'postsetupFields');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)