Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

Problem: I have opted to enable auto login/logout but when I change languages, I have to login again.

Solution: It looks like this issue is actually happening due to settings with your hosting provider. Some hosting providers are adding this header to their request responses to protect against clickjacking attacks: X-Frame-Options: SAMEORIGIN

You can see this happening when you try to change languages in the browser console. See attached image.

You can try adding the following: X-Frame-Options "ALLOW-FROM http://it.domain.host,http://domain.host,http://fr.domain.host"

In addition, I would like to add that the "ALLOW-FROM" directive is not compatible with all browsers (eg. Chrome). https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options#Browser_compatibility https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet#Browser_Support

A possible solution to include a fix for all the browsers is to use also the "Content Security Policy "frame-ancestors" directive" https://www.owasp.org/index.php/Content_Security_Policy_Cheat_Sheet#Preventing_Clickjacking

This topic contains 4 replies, has 2 voices.

Last updated by Lauren 1 year, 3 months ago.

Assigned support staff: Lauren.

Author Posts
August 9, 2018 at 11:19 am

ideaspace

I am trying to:

hidden link
If I switch language to French after login on English language, it ask to log in again.
hidden link

I checked this issue and found that there is a default option available for setting session between different languages. Looks like there is a issue of plugin.

https://wpml.org/documentation/getting-started-guide/language-setup/passing-session-data-between-languages-in-domains/

Can you please help us to resolve same?

August 9, 2018 at 6:00 pm #2630398

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.

If you change the way you are passing arguments, do you see any difference in the way the login/logout behaves?

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 TwentyFifteen. With these settings, is the issue resolved?

August 21, 2018 at 10:56 am #2662608

ideaspace

Hi,

We followed all your steps to check if issue get resolved in normal WP environment, the issue is still coming with WP default theme and only WPML plugin active.

We have also tried following solution but it also not worked.

define('WP_MEMORY_LIMIT', '128M');
define( 'WP_MAX_MEMORY_LIMIT', '128M' );

Can you please help us to fix this issue?

August 21, 2018 at 2:50 pm #2663598

Lauren
Supporter

Languages: English (English )

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

Thanks for testing. Since I am unable to see this test on your live site, please create a copy of your site on a staging environment so that I can further test this with minimal settings (all plugins other than WPML deactivated and default theme). You can share the credentials in your next reply. If you create it on a local environment, be sure to send information that I need to add to my hosts file to be able to view the site. Thanks!

August 22, 2018 at 2:28 pm
August 22, 2018 at 4:12 pm #2667452

Lauren
Supporter

Languages: English (English )

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

Okay, understood. It looks like this issue is actually happening due to settings with your hosting provider. Some hosting providers are adding this header to their request responses to protect against clickjacking attacks: X-Frame-Options: SAMEORIGIN

You can see this happening when you try to change languages in the browser console. See attached image.

You can try adding the following:
X-Frame-Options "ALLOW-FROM hidden link"

In addition, I would like to add that the "ALLOW-FROM" directive is not compatible with all browsers (eg. Chrome).
hidden link
hidden link

A possible solution to include a fix for all the browsers is to use also the "Content Security Policy "frame-ancestors" directive"
hidden link

Hopefully this helps. If you are not able to resolve this with the information above, please contact your hosting provider to see if they can adjust the settings.