Support » Plugin: qTranslate(-X) Separate Comments » a little correction on code

  • Resolved hyOzd

    (@hyozd)


    Hi,

    I made a correction on the code. In function named fix_comments_count(), there is a typo. Line 123 is;

    $comments = $comments_query->query( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC', 'meta_query' => array(array('key' => '_comment_language', 'value' => $q_config['language']))) );

    “$post->ID” is incorrect, I changed it to “$post_id” and line looks like this

    $comments = $comments_query->query( array('post_id' => $post_id, 'status' => 'approve', 'order' => 'ASC', 'meta_query' => array(array('key' => '_comment_language', 'value' => $q_config['language']))) );

    Now wordpress shows correct number of comments. But unfortunatelly this plugin is not working as it supposed to. It doesn’t solve redirect problem of qtranslate and doesn’t set correct language for comments.

    http://wordpress.org/extend/plugins/qtranslate-separate-comments/

Viewing 1 replies (of 1 total)
  • Plugin Author Nikola Nikolov

    (@nikolovtmw)

    Thanks for your fix, I’ll add it as soon as I can 🙂

    The thing about the qTranslate redirection and setting of the language is that I add hidden inputs to the Comments form – I use an action for that and if you have a custom comments form template(instead of using the comment_form() WordPress function) that doesn’t feature this action, then it won’t work properly.

    Once I add your suggested fix, I’ll also add this information to the FAQ section, so that people are aware of this 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘a little correction on code’ is closed to new replies.