Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by christianM-55 2 years, 5 months ago.

Assigned support staff: Lauren.

Author Posts
June 3, 2019 at 6:06 am #3939503

christianM-55

I am trying to: Post a comment in the German section of the site.

Link to a page where the issue can be seen:www.litore-x.com

I expected to see: The same language (German) after posting a comment.

Instead, I got: The site reloads and the english translated page appears.

June 3, 2019 at 5:41 pm #3945021

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thank you for contacting WPML support. I'll be happy to help you with this. I tested this in a clean install and was not able to reproduce the issue.

I'd like to have you try a few things so we can try to isolate the issue. This is just to help me identify if it might be a conflict with another plugin or theme that is causing the problem.

** IMPORTANT ** Please backup a working copy of site files and database before continuing.

Update all WPML plugins & WordPress core.

Disable all plugins except WPML related and then temporarily change the theme to a default WordPress such as TwentyNineteen. With these settings, does the page still redirect after the comment is submitted? If not, try activating the original theme, as this could be coming from an issue with the template.

June 15, 2019 at 2:48 pm #4027845

christianM-55

Hi Lauren,
Thanks for your help. If I change the theme to twentynineteen it works as it should. Means: If I post a comment in the German section, it loads the same (German) article afterward even without deactivating all plugins. If I deactivate all plugins except WPML, and use the Tracks Theme the errors still occurs.

I also posted my problem in the tracks theme support forum where the creator of the theme replied, may it help.

https://wordpress.org/support/topic/language-chance-after-comment

Any Ideas?

June 17, 2019 at 6:07 pm #4037741

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Hi Christian, thanks for testing that for me. I have set up a staging site. Please upload a copy of your theme here so that we can try and reproduce the issue on a clean install. Once we do that, I can escalate this to our compatibility team, and we can ask the author to join our Go Global program. Then our developers can work with him to find a solution.

Login: hidden link
Username: demo
Password: yOBN23q2Tl9f

June 18, 2019 at 3:51 pm #4044977

christianM-55

Hi Lauren,
The plugin was installed and activated! Good luck! 🙂

Best regards, Christian

June 18, 2019 at 6:22 pm #4045893

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thanks for installing the plugin. I activated theme and can see the redirect issue happening. I have escalated this to our compatibility team so they can contact the author and try to find a resolution.
I will update here as soon as I have more information.

June 20, 2019 at 5:59 pm #4062163

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Our 2nd tier found that the theme has a filter for the comment field that removes the language information that WPML adds.

We need to make this filter run before WPML, so it does not overwrite the language in the form.

To do so, change wp-content/themes/tracks/functions.php line 241 to:

add_filter( 'comment_form_field_comment', 'ct_tracks_update_comment_field', 9);

(note the '9' added)

I did this in the test site and it resolved the issue. If it works for you as well, you may want to reach out to the theme author to let him know so that he can update the code.

Please let me know if you need any further assistance and I will be happy to help.

June 23, 2019 at 7:39 am #4072629

christianM-55

My issue is resolved now. Thank you!