• Hi,

    last night I updated to WP 3.9.1 and switched from qtranslate to mqtranslate. While it looked smooth so far I just found that commenting does no longer work, when the site is shown in the non-default language.
    It seems along the way the comment field get renamed as the language is changed. For the same blogpost I have the comment field named c4516-comment on the english page and cf066-comment for the german version. when hacking wp-comment-post.php to find more info I see that when posting from the english page $_POST[‘c4516-comment’] is nul but $_POST[‘comment’] is set. Posting from the german version keeps $_POST[‘comment’] unset but has the comment in $_POST[‘cf066-comment’]
    This case fails as we later check if the comment has content. But thats not the case when posting from the german page.
    Is this a known problem? Is there a solution I haven’t discovered yet?

    Thanks a lot!
    Bernd

    https://ww.wp.xz.cn/plugins/mqtranslate/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author chsxf

    (@chsxf)

    I can confirm that commenting is functional even with mqTranslate.
    However, there is a known issue with commenting. Once comment in submitted, users are redirected to default language instead of the selected language. We will fix this in a future release.

    Thread Starter phaedrus77

    (@phaedrus77)

    Right the redirect to the default language I noticed after posting.
    Still the other problem remains for me. Meanwhile I hacked wp-comment-post.php to copy the content from the ‘german variable’ into the proper variable as well.
    Do you know where the names of the input fields get modified? So I can see if I hopefully find the problem (I’m fresh at working with WP code so any hint would save me a lot of time ;-))

    Thanks,
    Bernd

    Plugin Author chsxf

    (@chsxf)

    I am sorry but mqTranslate does not alter the comment form in any manner. However, the problem may be indirectly related to mqTranslate but a solution will be difficult to find.

    Thread Starter phaedrus77

    (@phaedrus77)

    Difficult to find. Right, got it anyway 🙂 At least that is what I see now. And how I can reproduce the error.
    It’s a combination of mqtranslate and antispam-bee.
    What happens is that antispam-bee modifies the field names in the comment form. They get some “secret” attached which varies with the language. When your bug hits that one is redirected to the default language antispam-bee cannot translate the field name back properly as it now tries to strip the prefix for the default language instead of the prefix that was added in the other language. This leaves the comment field empty for languages other than the default language and the comment gets rejected.

    Sorry to put the blame on you but fixing your redirection issue should resolve our problems as well.

    Thanks for your quick repsonse and all your effort!

    Bernd

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘comments fail for non-default language’ is closed to new replies.