Skip Navigation

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

Problem:
The client was experiencing an issue where after logging in on the Norwegian version of their site using the Uncanny Toolkit's [uo_login_ui] shortcode, they were redirected to a 'Page Not Found' error instead of the intended page. Additionally, the user was not actually logged in.
Solution:
We identified that the issue was related to the language URL format used on the site. To resolve this, we recommended changing the URL format from directories to parameters. Specifically, this involved navigating to WPML → Languages → Language URL Format and switching from /no/ to ?lang=no. This change successfully resolved the login and redirect issues. For further details on similar issues, you may check the errata documentation here: WPML Errata Documentation.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML Support Forum.

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 0 reply, has 0 voices.

Last updated by cimpleA 4 months ago.

Assisted by: Bobby.

Author Posts
March 6, 2025 at 2:07 pm #16783879

cimpleA

<b>Background of the issue: </b>
I am trying to set up a Norwegian version of the site, including the login and pages available for logged-in users. The login form is created using Uncanny Toolkit (shortcode [uo_login_ui] hidden link), combined with their login redirect module (hidden link) which is set to login redirect: hidden link. I also tried using a custom design for this login page with a slightly different shortcode [uo_login_ui redirect="/no/mine-kurs/]. [removed]

<b>Symptoms: </b>
After login, I am redirected to hidden link, which displays a string "Beklager! Siden ser ikke ut til å eksistere."

<b>Questions: </b>
Why am I not being redirected to the correct page after login?
How can I fix the login redirect issue for the Norwegian version of the site?

March 6, 2025 at 10:02 pm #16785544

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Please note that this is a public thread, for your security only share access details in private fields.

I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

March 8, 2025 at 12:06 am #16790512

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

I have verified that logging in from the Norwegian (NO) version redirects to a "Page Not Found" error. Additionally, I confirmed that the user is not logged in, and the only way to log in successfully is through the English login form.

As a test, I removed the following shortcode from the login page:
[uo_login_ui redirect="/mine-kurs/"]

I then deleted and retranslated the page to start fresh, but the issue persisted.

I was only able to resolve the issue by navigating to WPML → Languages → Language URL Format and switching from directories to parameters (changing from /en/ to ?lang=no). This resolved the problem.

You may also find the following errata documentation relevant:
https://wpml.org/errata/woocommerce-my-account-redirect-to-the-wp-login-page-in-a-secondary-language-after-logging-out/

Let me know your results, please.

March 10, 2025 at 12:39 pm #16796474

cimpleA

Hi Bobby,

Thank you for the update.

So I understand it that the language url format isn't compatible with our login shortcode. We'll have to stick with the /en/ format for now, so instead of resolving this by changing the format, we'll just avoid creating a translated version of the pages for the logged in user all together. The logged in pages isn't text heavy, so this is okay.

I solved this by adding a custom url to the translated menu, that links to the original language login.

Thanks!

Regards,
Mattias