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

Last updated by matthewK-11 4 months, 3 weeks ago.

Assigned support staff: Andreas W..

Author Posts
May 22, 2019 at 7:58 pm #3868929

matthewK-11

Hi, I'm reposting this support ticket that I made yesterday because I got an email saying that that ticket was unexpectedly closed.

Hello, I have my website setup with multilingual already. Everything seems to work for the most part. However, there's an error when I log out of ultimate member in my non-default language. Currently, I have my WPML configured to language as a parameter. When I click on the link to logout of ultimate member on a non-default language, I should expect it to redirect to the homepage of the non-default language (ie. example.com/?lang=zh-hant). However, instead, there as a language directory that gets added to the url (ie. example.com/zh-hant?lang=zh-hant). I'm a little bit lost on how to fix this. Thanks.

May 22, 2019 at 11:59 pm #3869785

Andreas W.
Supporter

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

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

Hello,

Thank you for contacting WPML Support.

Could you please try to set the site URL structure to "Language in directories" by going to WPML -> Languages.

Does this solve the issues?

If not, try to run the site in minimal setup to see if the issue persists as possibly another plugin is causing a compatibility issue.

In order to do so, disable any additional plugin but WooCommerce, Ultimate Member and WPML and its add-ons. If the issue disappears please start reactivating any plugins, or activate them in small groups. This way please verify at which points the issue appears again to indicate the plugin that is causing the issue.

Also please change to a default theme like TwentySeventeen to see if the issue might be theme related.

Further, you could enable the wp-debug feature to see if there are any current PHP errors given.

Add the following to your wp-config.php file:

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );

The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

If you open wp-config.php and that define statement is not there, you can add it right before this line:

/* That's all, stop editing! Happy blogging. */

You will be able to see errors on front end, backend and further find a complete report inside of your wp-content folder. Look for a debug.log file and provide me the results.

More information about how to activate this feature you can find here:
https://wpml.org/documentation/support/debugging-wpml/

Let me know about the outcome.

Kind regards
Andreas

May 23, 2019 at 11:01 pm #3879797

matthewK-11

Hi Andreas

Thanks for posting that. Unfortunately, none of the suggestions seem to be working.
For the site URL structure, I get the error that language by directory does not work. I tried running the site on a minimal setup and with the 2017 theme, but even then I still get the same error (404 page with url like this: /zh-hant?lang=zh-hant). How do I provide my debug information to you?

May 24, 2019 at 6:43 pm #3887127

Andreas W.
Supporter

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

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

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.
If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Kind regards
Andreas

May 29, 2019 at 4:48 pm #3917535

Andreas W.
Supporter

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

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

Hello,

Before we take any further steps please go to Dashboard and complete the setups for Media Translation, WooCommerce and WooCommerce Multilingual. Then go to Dashboard -> Updates and complete the pending updates. There are currently more than 30 updates for Plugins and Themes available, also WPML is not up-to-date.

It might be that the issue you are expereicning has been solved in a latest version of a plugin or theme. Please complete the updates and let me know if the issue persists.

I do not see any issue in regards to WPML on the debug.log which for the current issue must be caused due incompatibility with another plugin.

Further, I can see on your debug.log that there are errors in regards to the plugins Woo WeChatPay and/or WooCommerce Alipay Cross-Border. Please disable the plugins temporarily and let me knwo if the issue persists. There is also a database error displayed at the bottom which is related to WooCommerce and might be caused buy the above mentioned plugins.

You might further deactivate any plugin but WPML And WooCommerce and its add-ons to verify if this solves the URL issue. Afterwards start reactivating each plugin one by one to determine which plugin causes the issue.

Let me know about the outcome in order to be able to assist you further. We might then test the plugin that is causing the issue and escalate the issue to our compatibility team in oder to reach out to the plugin authors.

Kind regards
Andreas

May 29, 2019 at 4:58 pm #3917629

Andreas W.
Supporter

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

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

Hi,

I additional to my last message I forgot to mention, that if you are unable to activate language in directories, then this nis caused due to DNS server settings.

Please read the following documentation and consult your host in case you need further assistance.

https://wpml.org/faq/server-setting-for-languages-in-directories/

Kind regards
Andreas

May 30, 2019 at 12:32 am #3919235

matthewK-11

Hello, I found the solutions myself. The reason I was getting an error for login/logout was because I didn't set the redirect links for each ultimate member role. The redirects originally defaulted to the ultimate member user pages, but this doesn't work for non default languages because it adds the extra the language directory on the url (still not sure why they do this). The solution for me is to allow translatable roles in ultimate member and create a translation for each role. Within each role translation, there is an option to redirect after a login or logout, and I set it to redirect url, and entered the url link to the page I wanted.