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 10 replies, has 2 voices.

Last updated by valeriec-5 2 months, 3 weeks ago.

Assigned support staff: Raja Mohammed.

Author Posts
July 19, 2019 at 10:23 am

valeriec-5

Hi,

The site and the translations are working perfectly as a logged in user. Pages display correctly, and switch smoothly between french and english.

However, when a non logged-in user tries to use the site, the WPML plugin doesn't work properly. For example, when the user tries to change the language from french to english, the header is still the one associated with the french pages. Same when switching from english to french.
Another bug is that when the user changes the language on any french page of the site, he is redirected to the english version of the home page, or sometimes to a seemingly random english page of the site.

I already tried to go to WPML->Languages->Language filtering for AJAX operations and enable the "Store a language cookie to support language filtering for AJAX" option. The option is enabled, but the problem is still there.

July 19, 2019 at 11:24 am #4245997

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi there,

I will help you with your issue,

Can you please give me an example page where the issue can be seen? A couple of screenshots would be of great help as well.

I have visited your site in a private browser everything seems to work fine, Maybe I am missing something or the issue is already resolved can you please clarify?

You have said the header remains the same for both English and french, let me know the place where the header can be set for the site.

Kind regards
Raja

July 19, 2019 at 12:26 pm #4246399

valeriec-5

Thank you for your answer. For example, for the page "Ethos" in the french version (URL : hidden link ), when switching to the english version, I end up on the english version of the home page of the site (URL : hidden link ), and the header is still the one associated with the french version of the site.

The two screenshots below illustrate this example.

Another example : when going to the homepage and trying to switch the language to english, the home page does load in english, but the header remains the french one (again, ONLY when the user isn't logged in). From the screenshot you provided, it seems that you did not encounter this issue when testing on your private browser, even when logged out : any idea of why ?

The header is set by the theme (Pulse). Its options can be managed from Appearance -> Theme option -> Header section. The menus in the header, that are supposed to change according to the language, can be managed from Appearance -> Menus. In the FTP, the header file is located at : /www/wp-content/themes/pulse/header.php.

July 22, 2019 at 9:03 am #4255099

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I have tested this in details, this seems more like a compatibility issue with the theme, i have added footer language switcher navigating using the footer language switcher works fine without any issue, However, the language switcher added to menu does not seem to change the header as expected.

I have recorded my action please check hidden link

To isolate the issue I would request you please follow a few debugging steps,

- Deactivate all non-wpml plugins check if the issue still persists.
- If the issue disappears activate the plugins one by one to single out the conflicting plugin
- If the issue still exits after deactivating all non-wpml plugins, then this is probably a compatibility issue with the theme, I will let you know the further details in such case.

Please let me know the results.

Kind regards
Raja

July 23, 2019 at 7:50 am #4263417

valeriec-5

Hi,

I did as you suggested and deactivated all non-wpml plugins. The issue didn't persist, until I activated the WPBakery Page Builder plugin, that works with the theme Pulse we are using on the website. This is rather strange since WPML should be compatible with Bakery as indicated in the "Compatibility" tab of my account.

Anyway, the compatibility problem seems to come from this plugin, but since the theme Pulse is associated with it, it might as well be a theme issue ?...

Should I try to reinstall WPBakery Page Builder ? Do you have an idea on how to solve the issue ?

Thank you very much

July 23, 2019 at 1:13 pm #4266365

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would rather assume the issue is with the theme rather than the WP Bakery Builder. Probably this is related to the theme customization with the page builder plugin.

To confirm this after a backup of your site, Change the theme to any of WordPress default theme with all the plugins active check the issue still persists.

Or the cleanest way is to reproduce in a clean installation, This seems like a compatibility issue with the theme, Please upload the theme and related plugin to the sandbox site and set up a few dummy pages try to reproduce the issue.

One-Click Login:hidden link

Let me know once done.

Kind regards
Raja

July 24, 2019 at 9:12 am #4272059

valeriec-5

This definitly seems like an issue related to the theme customization with the page builder plugin.

I tried to change the theme to any of the WordPress default theme, but it crashed the site ("this site is experiencing technical difficulties" message when trying to access the site or the backend).

To confirm that the problem does come from the theme customization with the page builder plugin, I tried to install the theme and the page builder plugin SEPARATLY on the sandbox site : the translations worked like a charm (see screenshots below).

Do you have any idea on how I can solve the compatibility issue of WPML with the theme customization with the page builder plugin ?

Thanks

July 24, 2019 at 12:19 pm #4274339

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The issue is not reproduced on the clean installation, I would request you please send a snapshot (copy) of your site I will try to reproduce the issue in my local installation, You can use the Duplicator plugin to create a snapshot of the site and share the package link with me http://wordpress.org/plugins/duplicator/

I have enabled private fields for you to securely share the details.

Kind regards
Raja

July 24, 2019 at 12:44 pm
July 25, 2019 at 6:50 am #4279621

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

For some reason, the duplicator is not working on my local installation, I have tried multiple times with no luck.

Since the issue cannot be reproduced on a clean installation this can be a possible plugin conflict with WPML.

Please perform the basic debug steps
- Disable all non-wpml plugin except those required by the theme, Clear the cache and check if the issue persists

- If the issue disappears Enable the plugins one by one to single out the conflicting plugin

Let me know the results.

Kind regards
Raja

July 26, 2019 at 8:08 am #4288237

valeriec-5

Hello,

I isolated the issue and solved it. If someone have a similar issue, the problem arised from the use of AJAX by the theme, even when the WPML option "Store a language cookie to support language filtering for AJAX" was activated. Deactivating the AJAX calls used by the theme (in the theme options) solved everything.

Thank you for your help

July 26, 2019 at 8:08 am #4288239

valeriec-5

My issue is resolved now. Thank you!