WordPress.org

Ready to get started?Download WordPress

Forums

Where is it coming from ? (3 posts)

  1. mouzaia34
    Member
    Posted 6 years ago #

    Hello again,

    Testing wordpress, I have this message when I try to see the comment of the 'HELLO WORLD' page. Of course I see the error, but I dont find in the sources where it is generated ! Can you help ? Thanks.

    SELECT p.* FROM wp_posts AS p INNER JOIN wp_post2lang p2l ON wp_posts.ID = p2l.post_id INNER JOIN wp_languages l ON p2l.language_id = l.language_id WHERE p.post_date < '2008-05-18 11:11:51' AND p.post_type = 'post' AND p.post_status = 'publish' AND l.language_id IN (1) ORDER BY p.post_date DESC LIMIT 1

  2. mouzaia34
    Member
    Posted 6 years ago #

    I forget the message:

    WordPress database error: [Unknown table 'wp_posts' in on clause]

  3. mouzaia34
    Member
    Posted 6 years ago #

    A really bad fix:

    in wp-includes/link_template.php:
    [backticks]
    $join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_cat, $excluded_categories );

    // HERE:
    $join = str_replace("wp_posts.ID","p.ID",$join);

    $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare("WHERE p.post_date $op %s AND p.post_type = 'post' AND p.post_status = 'publish' $posts_in_ex_cats_sql", $current_post_date), $in_same_cat, $excluded_categories );
    $sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order LIMIT 1" );
    [/backticks]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.