Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing an issue where the admin interface language does not change according to your user settings when the Nextend Social Login plugin is activated, we have identified a conflict that may be causing this.

Solution:
First, locate the following hook in the Nextend Social Login plugin code:

add_filter('nsl_redirect_uri_override', array(
                'NextendSocialLoginAdmin',
                'WPML_override_provider_redirect_uris'
            ), 10, 2);

This hook uses the function 'WPML_override_provider_redirect_uris' which may not generate language-specific URLs correctly. A temporary workaround is to change a line in this function from:

$languageCodeWasOverridden = true;

to:

$languageCodeWasOverridden = false;

However, we have consulted with our compatibility team and confirmed that the issue seems to be a bug in Nextend Social Login. We recommend reaching out to the Nextend Social Login authors to report this problem. Additionally, ensure that you have followed the necessary configurations for compatibility as outlined in their documentation:
Nextend Social Login and WPML Compatibility Documentation

If after following these steps the problem persists, please open a new support ticket with Nextend Social Login here:
Nextend Social Login Support Contact Form

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, don't hesitate to open a new support ticket with us.

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.

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by Andreas W. 8 months, 1 week ago.

Assisted by: Andreas W..

Author Posts
February 23, 2024 at 12:02 pm #15337450

evgenyM

Dear WPML Support Team,

I am experiencing an issue with the WPML plugin on my website, where the language preference for the admin interface does not change according to the user's settings. Despite having studied the WPML documentation and setting the language preference for my user account to English, the admin interface still appears in German when I access the site in German. This issue persists even though I have selected English as my preferred language in the user settings.

Upon further investigation, I discovered that the conflict arises when the Nextend Social Login plugin is activated. To identify the cause, I deactivated plugins one by one and pinpointed that the Nextend Social Login plugin is triggering this issue. Both plugins are essential for my site, and they are updated to their latest versions.

Is there a way to resolve this conflict so that the admin interface language adheres to the user's chosen language setting, irrespective of the site's current language? Your assistance in finding a solution or providing a workaround would be greatly appreciated.

I already wrote about this problem to Paola Mendiburu. But for some reason she closed the chat while I was writing her a response, saying that she had not checked what I asked. To reproduce my problem you need:
1. Set your user's language to English in Language in the user settings
2. Switch the site in the admin bar to French
3. Please note that the entire admin panel is now in French (the buttons Edit, Delete in page and everything else, even the user settings will now be in French)
4. Go to plugins and disable Nextend Social Login, then you will see that being on the French version, all buttons and user settings are in English, as it should be. Since you set your user to English.
Please do these steps specifically in English.

Not all of our administrators know French, but if a translator posts a finished post in French, then the administrator must publish it. It is much more convenient when the administrator sees everything in the admin panel in English, and adds content only in French. And he does not need to be afraid that he will now click something wrong in the admin panel, since he does not know French, since for him the admin panel will always be in English, no matter what other language he edits posts.

Screenshot.png
Screenshot2.png
Screenshot3.png
February 24, 2024 at 1:19 pm #15340398

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

I can offer that we try to recreate this issue on the WPML test site (which I will provide) but I might need you to install the "Nextend Social Login Pro Addon".

I already ran a test with the free version of "Nextend Social Login" and I can not yet confirm the issue.

One-Click-Login:
hidden link

First, please go to Plugins > Add new > Commercial, click "Search for WPML Updates" and make sure to install the latest version of our plugins. (there is a new version for String Translation available).

If this will not solve the issue, please try recreating the issue on this test site by using the same settings.

Best regards
Andreas

February 26, 2024 at 11:00 am #15343640

evgenyM

Now this bug also exists on an important stage after activating one of the Nextend Social Login connections. For example, I activated Google.
And please set the user's default language to English.

Screenshot (2).png
Screenshot (4).png
February 27, 2024 at 4:11 pm #15350050

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

I can not confirm an issue with setting the admin language to French or English on the user profiles on my test site.

See screenshots.

This means, that the issue on your site might be further caused by another plugin.

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.

If you are unable to provide such a copy of the site for testing, please let me know on this ticket.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

french.png
EN.png
February 27, 2024 at 11:04 pm #15351551

evgenyM

I hope this message finds you well. Could you please take another careful look at the issue I've previously reported in my ticket? It appears that the behavior I am experiencing on our site is also present on your staging environment. Here are the detailed steps that I follow to demonstrate this bug:

1. I set the default language to English for the user account under which I am logged in. The expected behavior is for the site's admin area to be in English regardless of the selected language.
2. I switch the language to French from the top panel and notice that the entire admin area changes to French.
3.With the French language selected in the top panel, I go to the plugins section and deactivate the Nextend Social Login plugin.
Following this action, the admin area switches back to English as expected, even though French is still selected in the top panel.
4.Upon reactivating the Nextend Social Login plugin, the button names change to French (Réglages | Analyze & Repair | Désactiver), and the entire admin area switches to French as well.

I have recorded a video to demonstrate these steps, which can be viewed here:
hidden link

Could you please confirm if you are witnessing similar behavior on your end? My investigation indicates that this issue might stem from a conflict with the Nextend Social Login plugin. It appears there may have been some misunderstanding in our communication, and I aim to resolve this issue as smoothly as possible.

Providing access to our staging environment seems redundant at this moment, given that the same problem exists on your end. I am hopeful for your guidance and support in resolving this conflict.

Thank you very much for your time and understanding. I look forward to your prompt and helpful response.

February 27, 2024 at 11:16 pm #15351613

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

I can not confirm this on my test site and there seems to be something wrong with your site, as the admin strings usually will not switch language when using the language switcher inside the top admin bar unless you enable the profile option:

WPML language settings > Editing language > Set admin language as editing language.

Guide:
https://wpml.org/documentation/getting-started-guide/language-setup/setting-the-wordpress-administration-language/#:~:text=In%20the%20WPML%20language%20settings%20section%20select%20the,in%20English%20and%20arranged%20from%20left%20to%20right.

Would you like to provide me access to your site, so that I can take a closer look?

February 27, 2024 at 11:33 pm #15351621

evgenyM

1. Have you watched my video? If so, you should have noticed that it was recorded on your test site. hidden link
2. Do you consider the behavior shown in my video to be a bug?
3. Could you record a video on your stage performing the exact same steps?

February 27, 2024 at 11:46 pm #15351622

evgenyM

Thank you for your prompt response. However, I must clarify that the video I provided was recorded on your staging site, not mine. This is a crucial detail because it demonstrates that the issue is not unique to my site but can also be replicated on your test environment using the same steps I have described.

Given that this issue is reproducible on your staging site, I believe there might be a misunderstanding or an oversight in reviewing the video I shared. Here is the link to the video again for your convenience: hidden link. I kindly ask you to watch it, as it clearly demonstrates the steps taken and the resulting issue on your staging environment.

I am more than willing to provide access to my site for further investigation. Still, I firmly believe that a review of the problem on your staging site, as demonstrated in my video, is essential for diagnosing the issue accurately.

Could we perhaps revisit the steps I've outlined in the video on your staging site to confirm the behavior? This approach might provide more insight into the problem and guide us towards a more effective solution.

February 27, 2024 at 11:46 pm #15351623

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

I am sorry, but I try to follow the same steps as in your video, and I can not confirm the issue.

See the screenshot with the profile language set to English and the admin bar set to French. All strings remain in English unless you enable the option "Set admin language as editing language".

Maybe you could provide me a list with steps in text?

Captura de pantalla 2024-02-27 184435.png
February 27, 2024 at 11:55 pm #15351643

evgenyM

Thank you for your efforts and the update. I appreciate your attempt to replicate the issue by following the steps outlined in my video. However, upon reviewing your site just now, I've noticed that the Nextend Social Login plugin is currently deactivated, which could explain why you did not encounter the issue as demonstrated.

For clarity and to ensure we're on the same page, could you please confirm if the Nextend Social Login plugin was active when you took the screenshot? The issue I'm reporting only occurs when this specific plugin is activated. With the plugin deactivated, the admin area behaves as expected, which is consistent with your findings but does not address the bug I've encountered with the plugin activated.

Here are the steps again for your reference:
1.Ensure the Nextend Social Login plugin is activated on the site.
2. I set the default language to English for the user account under which I am logged in. The expected behavior is for the site's admin area to be in English regardless of the selected language.
3. I switch the language to French from the top panel and notice that the entire admin area changes to French.
4.With the French language selected in the top panel, I go to the plugins section and deactivate the Nextend Social Login plugin.
Following this action, the admin area switches back to English as expected, even though French is still selected in the top panel.
5.Upon reactivating the Nextend Social Login plugin, the button names change to French (Réglages | Analyze & Repair | Désactiver), and the entire admin area switches to French as well.

This detailed step-by-step process is crucial for replicating the bug accurately. Could you please try these steps again, ensuring the plugin is active during the test?

Your assistance is greatly appreciated as we work together to resolve this issue. Thank you for your time and understanding.

February 28, 2024 at 12:18 am #15351653

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

My apologies, I can see now the unexpected behavior.

Now, this seems to be an issue caused by "Nextend Social Login".

I will run a few more tests and then escalate the issue to our compatibility team.

February 28, 2024 at 9:23 am #15352795

evgenyM

I am pleased to hear that the unexpected behavior has been acknowledged. Your efforts to investigate this matter further are greatly appreciated.

To ensure a thorough understanding of the issue, I would like to add an important detail for your tests and subsequent escalation to the compatibility team: the bug manifests when the Nextend Social Login plugin is not only activated but also configured with at least one social login connection. On your staging site, I had activated the authorization via Google. This configuration step is crucial, as simply activating the plugin without setting up a social login connection does not lead to the bug.

I hope this information assists in accurately diagnosing and ultimately resolving the issue. Thank you once again for your dedication to addressing this. Please keep me updated on any developments.

February 28, 2024 at 9:50 pm #15355903

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

The behavior is triggered in:

wp-content\nextend-facebook-connect\nextend-facebook-connect\admin\admin.php:

The following hook is used:

add_filter('nsl_redirect_uri_override', array(
                'NextendSocialLoginAdmin',
                'WPML_override_provider_redirect_uris'
            ), 10, 2);

This hook uses the function 'WPML_override_provider_redirect_uris' which is found on line 877:

/*** When WPML is set to a non-default language in the backend, then the $wpml_url_converter->convert_url() function won't generate language specific URL
* if the provided language code is the same the the language code that the backend currently uses.
*/

if ($originalLanguageCode && $defaultLanguageCode && $originalLanguageCode !== $defaultLanguageCode) {
                                    self::change_WPML_language_code($defaultLanguageCode, false);
                                    $languageCodeWasOverridden = true;
                                }

Workaround:

Change this line to:

$languageCodeWasOverridden = false;

I am not sure why the author is using the code in this way, but I am consulting our compatibility team about it and I will let you know once I receive their feedback.

Best regards
Andreas

March 5, 2024 at 10:45 am #15373752

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

The compatibility team confirmed that the issue seems to occur due to a bug in Nextend Social Login.

I would like to ask you kindly to reach out to the author of Nextend Social Login and report the problem that I mentioned in my last comment.

We will also try to reach out to report the issue.

Best regards
Andreas

March 5, 2024 at 2:24 pm #15374986

evgenyM

Hello,

Thank you very much for your thorough investigation and for identifying the trigger behind the issue. I appreciate the detailed explanation and the suggested workaround. It's clear that a significant amount of effort went into diagnosing this problem.

I will follow your advice and reach out to the Nextend Social Login team to report the issue, mentioning the specific details you've provided. It's reassuring to know that your compatibility team is also looking into this matter and will be reaching out to them as well.

Thank you again for your support and guidance on this matter. Please keep me updated with any further feedback or developments from your side.

Best regards