I’ve installed the plugin into my website, and it still redirect to default language. What can I do to fix it?
Sorry for answering after so much time – I don’t get emails when new support topics are opened and I haven’t looked here for a long time 🙂
Any way, I registered for your site and I’m waiting for the email right now, so that I can take a look at your comments form.
I guess though that the hidden inputs that I add in order to get the proper language and redirection are not added to your comments form.
I’ve already figured out several weeks ago. Everything works fine now. Thanks anyway for your plugin 🙂
Was that the problem or was it something else?
There is a bug with redirection. If we have a
/land/type of url-modification, redirection always works to main language page.
mysite.com/fr/contactwill redirect to
I’ve looked for and find that there is a hidden input, but it has wrong value like this
Anyway, thanks for your plugin. If you have solution let me know.
Hi, can you try to change this code in
And tell me if it works,
No, it doesn’t ))
Redirection still goes to main lang.
Comment leaved on additional language page marked as a main lang (it was before this fix too).
But now hidden input looks like:
<input type="hidden" value="http://mysite.com/fr/contact/" name="qtc_comment_from">
Before this fix it looked like:
<input type="hidden" value="/contact" name="qtc_comment_from">
If manualy change (with firebug for exp.) it to
/fr/contacteverything works fine (
<input type="hidden" value="/fr/contact" name="qtc_comment_from">).
What if you do this:
return preg_replace( '~' . preg_quote( home_url( '' ), '~' ) . '~', '', qtrans_convertURL() );
I’m sorry for making you test things out like that, but I have too much work right now to test this myself 🙂
Glad it works 🙂
I’ll put this into an update really soon.
I tried your hack above but it didn’t work on my dev site. Is there anything I am doing wrong here?
My dev site: http://www.196flavors.com/dev
The comment gets posted in default language and user is redirected to post in English (default language)
Thanks for your help. This would be a great plugin if it worked on our site.
Hi, it seems that you’re missing the
comment_formaction hook in your custom comments form.
See this entry from the “FAQ” of the plugin:
The plugin doesn’t redirect to the proper language and the language is set incorrectly
In order to properly identify where the comment is coming from, this plugin adds a hidden input to the Comments form. This is done by hooking a function to the
comment_formaction hook, which is called from the
comment_form()WordPress function. If you are using a custom comments form instead of calling this function, make sure to add
<?php do_action( 'comment_form', $post->ID ); ?>. If this still doesn’t work, replace that code with the following:
<?php global $post; do_action( 'comment_form', $post->ID ); ?>.
Adding the above should solve your issue.
Thanks Nikolov but I am not sure where to place this code.
For info, I was using the standard comments before yesterday and it still didn’t work. I installed Jetpack comments (right before I posted my question) and that is what you tested and why you made a reference to a custom comments form.
Could you help me understand where to place this code:
1. For the standard comment form
2. For Jetpack (if possible)
FYI, I just reverted back to the standard comments form by deactivating Jetpack
Can you mail me at [my username]@gmail.com ?
- The topic ‘Comments Redirect doesn't work’ is closed to new replies.