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

Problem: WHen I try to logout of Ultimate Member in a secondary language, the page just redirects to the logout page but doesn't log the user out.

Solution: Thanks for the additional information. I think I've got this fixed. I found that there are settings in Ultimate Member where you set the logout page. I then went to the admin texts and found the core page IDs in the um_options section. I added these to the String Translation table by adding the keys to WPML -> Translation Management -> Custom XML Configuration. I then translated the core page IDs to the ID of the translated pages. Now, when logged in in French, the Logout button logs you out.

0% of people find this useful.

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.

Our next available supporter will start replying to tickets in about 2.07 hours from now. Thank you for your understanding.

This topic contains 6 replies, has 2 voices.

Last updated by Ilana Wilner 2 years, 4 months ago.

Assigned support staff: Lauren.

Author Posts
February 22, 2018 at 7:16 am

Ilana Wilner

Hi,

When I try to log out of the site, it works fine on the English (main) site but doesn't for the additional languages. For these it just redirects to the logout page (but doesn't log me out).

I know I am not the only person with this but I wasn't able to find an answer. Here is another post with the same issue - but I am not sure how to apply the solution:
https://wpml.org/forums/topic/logout-link-not-working-in-different-language/

You can duplicate issue by following these steps:

1. Go to hidden link

2. In the main navigation, select French from the WPML language drop down.

3. Then select Connectez (Login) in the main navigation and enter in the following login

email: test@test.com
password testtest

4. Once you are logged in, click the Deconnecter in the main navigation

5. You will see that you are directed to the Déconnecter page, not actually logged out.

Please let me know what I can do to solve this issue.

Thanks!

February 22, 2018 at 3:42 pm #1526404

Lauren
Supporter

Languages: English (English )

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

Thank you for contacting WPML support. I'll be happy to help you with this.

The credentials provided are not allowing me to login and take a look. For the logout link in the menu, is this set up as a custom link, or as a page?

Is there a place in the Ultimate Member settings that you create this logout endpoint or URL? If so, please check WPML -> String Translation to see if this URL has been translated. You may need to check the text admin strings to find this. Please go to WPML > String Translation and scroll down to the bottom of the page and click on the link "Translate texts in admin screens »". Then, scroll through that page and see if you find the the string. If so, tick the checkbox and click Apply to add it to the String Translation table. Now you can go back to WPML > String Translation and you should see the string added there.

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

February 22, 2018 at 8:33 pm #1526744

Ilana Wilner

Thanks for your help!! I really appreciate it! See answers to your questions above.

>>> The credentials provided are not allowing me to login and take a look.

I have changed them and confirmed they work. You should be now able to log in to WordPress.

>>For the logout link in the menu, is this set up as a custom link, or as a page?

I followed the same way as with the English - I am using the normal WordPress menus and it is set up as a page. Of course I can do it as a custom link if that is better. (To make sure that I am being clear I have attached a screen shots of how it is set up now - both the English and the French.)

>>Is there a place in the Ultimate Member settings that you create this logout endpoint or URL?

I took a look but don't see anything... And I am guessing as it is an issue with the url?

In English when I log out the url is "/logout" In French it is "logout/?lang=fr" which is redirecting to the French version of the logout page and not performing the action of logging out.

If there is anything else I can supply, please let me know.

February 22, 2018 at 9:02 pm #1526782

Lauren
Supporter

Languages: English (English )

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

Thanks for the additional information. I think I've got this fixed. I found that there are settings in Ultimate Member where you set the logout page. I then went to the admin texts and found the core page IDs in the um_options section. I added these to the String Translation table by adding the keys to WPML -> Translation Management -> Custom XML Configuration. I then translated the core page IDs to the ID of the translated pages. Now, when logged in in French, the Logout button logs you out.

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

February 22, 2018 at 9:17 pm #1526794

Ilana Wilner

THANK YOU!

It is almost working.... It is definitely logging out now! However I end up at a 404 page because the URL of the home page where it redirects after logout isn't correct:

It is saying it is:
hidden link

But really it should be: (no /fr)
hidden link

(see screenshot)

Also could you provide the specifics of what you did? I will need to apply it again to my development site so that I don't overwrite what you did when I copy the site over.

Thanks!!

February 22, 2018 at 9:47 pm #1526823

Ilana Wilner

I think I see what you did - no need to explain... thanks!

February 23, 2018 at 12:27 am #1526909

Ilana Wilner

Thanks for all of your help Lauren! It is now working!

Just in case it is useful for others, I found that by changing under "WPML" > "Languages" > "Language URL format"

from:
"Language name added as a parameter (hidden link - French) "

to:
"Different languages in directories (hidden link - English, hidden link - French) "

It all worked!

Thank you!!!