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 11.42 hours from now. Thank you for your understanding.

This topic contains 5 replies, has 2 voices.

Last updated by Andreas W. 4 months ago.

Assigned support staff: Andreas W..

Author Posts
June 6, 2019 at 12:34 pm #3969249

Derek

I am trying to:

Make the plugin work like it should...

Link to a page where the issue can be seen:

hidden link
hidden link
hidden link

The above URLs are all active translations of hidden link, however they are redirecting to the default locale even though they shouldn't be. This is happening randomly on other translated pages as well - can't find a pattern or reason.

I tried dumping the WPML cache, no-luck, the only thing that fixes it is giving it a different url path (e.g: /de/products/ekahau-connect/survey-2) - but the URLs shouldn't change (or need to).

June 6, 2019 at 9:10 pm #3972073

Andreas W.
Supporter

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

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

Hello,

Thank you for contacting the WPML Support Forum.

It seems as WPML is currently not activated on your website. My first question would be, if the product category is translated into the additional languages? Are the product URls behaving correct when using these URLs:

hidden link
hidden link
hidden link

Could you please try to run the site in minimal setup to see if the issue persists?

Please disable any additional plugin that is not related to 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', false);

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/

Kind regards
Andreas

June 7, 2019 at 12:26 pm #3976279

Derek

Why would you say that WPML isn't active? It is active and running other translated pages for example:

hidden link

We don't have a menu language switcher in place yet because we're trying to work through these bugs before "launching" the functionality via the menu switcher.

In order to debug I will need to move the site into a non-production environment so I'll let you know what I find.

June 7, 2019 at 5:09 pm #3978125

Andreas W.
Supporter

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

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

Hello,

Did you try to reinstall WPML and its add-ons?

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

June 17, 2019 at 1:48 pm #4035765

Derek

I unfortunately cannot grant any type of access to the site or install those plugins on a production environment for this site. We have a staging environment - but it is behind a firewall and only accessible to those inside the clients VPN.

We don't want to re-install WPML - and shouldn't have to considering it was a fresh installation to begin with. We have 100's of translations in the site already - and we don't want to risk them being removed.

I could possibly provide the theme and DB files to you directly for a local environment setup. But I cannot allow access to the clients site directly.

June 17, 2019 at 5:26 pm #4037519

Andreas W.
Supporter

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

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

Hello,

I can offer you to migate the website too our test-server on Cloudways? Would this be convenient for you?

Further, in regards to you first question:

Link to a page where the issue can be seen:

hidden link
hidden link
hidden link

I can see that the slug "products" is not translated.

Please go to WPML -> Settings and enable the option for "Slug Translation". Now you will be able to translate slugs for post types taxonomies directly on the WPML -> Settings page.

More information here:
https://wpml.org/documentation/getting-started-guide/translating-page-slugs/

Further you are saying:

"however they are redirecting to the default locale even though they shouldn't be. This is happening randomly on other translated pages as well - can't find a pattern or reason."

What do you mean with redirecting to the default locale? How they are redirected? Could you clarify the issue a little further?

Further, you can set language to hide at WPML -> Languages and activate one of the WPML language switchers.

The "hide" option wil make the content only visible for logged in Admins, Translation Managers and Translators. The language switcher and languages will not be visible for clients. This way you will be able to test if the switcher redirects pages , posts and products correctly.

https://wpml.org/documentation/getting-started-guide/language-setup/hiding-languages-on-the-front-end/

Kind regards
Andreas

The topic ‘[Closed] Translated pages randomly redirect to default translation’ is closed to new replies.