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

Last updated by Alejandro 6 months, 1 week ago.

Assigned support staff: Alejandro.

Author Posts
April 2, 2019 at 10:34 am #3516109

alexP-13

Hi,

I just realised that hen I click on the language switcher it doesn't show the slug to the corresponding language, so it stays on the same page.

I can see that both languages are working because if I enter the url manualy the articles are accesible normally.

I have tried adding the footer switcher but it didn't work either.

Thanks

April 2, 2019 at 10:58 am #3516281

alexP-13

I forgot to mention, this is only happening within the blog section. The rest of them seem to be working fine.

April 2, 2019 at 2:21 pm #3518289

alexP-13

I have also noticed that this page:

hidden link

is working fine but when /us is removed, instead of directing to the translated version it goes to:
hidden link

With this one is the opposite, this one is working but it doesn't when /us is added:
hidden link

April 3, 2019 at 7:32 am #3523067

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hello!
Welcome to WPML Support.
I'll do my best to help you solve this issue.

I see that you are still not meeting our minimum requirements, so let's start with that:

Please add this code into your wp-config.php file, right after the database information

define('WP_MEMORY_LIMIT','128M');

Afterwards, go to WPML > Support > Troubleshooting > disable and then enable the Language switcher template cache.

Last but not leastThen press the "Clear WPML cache" button (I'ts in the same page)

Let me know if this helped.

April 3, 2019 at 9:04 am #3523829

alexP-13

Hi! I have followed these steps but still experiencing the same issues

April 3, 2019 at 12:56 pm #3526275

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Could you allow me access to your site and point me to one of the pages where the language switchr is not working correctly please?

I have just activated the appropriate fields for the credential information i need from you. they are private so only you and i will be able to see them.

I suggest you create a temporary user, set it as an administrator and then add those credentials in the fields mentioned above.

April 3, 2019 at 2:39 pm #3527407

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

I checked a few pages and it's not happening on some.

I also see a few json and mixed content errors on the site. could you disable google analytics and check those json errors? they seem to be linked to the problem.

last but not least, Please follow the instructions mentioned on this page: https://wpml.org/documentation/support/debugging-wpml/

Try to recreate the problem once you have added those lines to your wp-config.php file and then go to your installation's wp-content folder and find the "debug.log" file that should've appeared by now (it will appear if it enocunters an error in your server).

Then, upload that file into a storage platform of your choosing (Google Drive, Dropbox, etc) and send me the link (make sure it's set as "public" otherwise i won't be able to access its content) so i can download it and take a look at it, and determine where to go from there.

Regards.

April 3, 2019 at 3:19 pm #3527959

alexP-13

I haven't been able to disable Google Analytics as I need to ask for permission but I have done the second step and this is the link to the debug.log file:

hidden link

April 3, 2019 at 4:32 pm #3528663

alexP-13

I just also found this, in case it helps.

April 4, 2019 at 6:50 am #3532407

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi, try to do the following:

1) Install Translation Management and see if it works
2) Try to install String Translation and see if it works
3) try to update both plugins above and WPML core to the latest released version (released yesterday)

If these plugins do not help the case, let me know. in the meantime i created a copy of your test site so i can check it out and try to figure out what else is going on, because the issues mentioned on the debug.log are issues coming from either a plugin or a theme but it doesn't say which one in there although by the looks of it, it sounds like Yoast (which is a bit weird)

So maybe try to disable that plugin and check the error.log file again and see if something new pops-up (and let me know).

April 4, 2019 at 9:16 am #3533439

alexP-13

Hi, I have followed all the steps mentioned but they didn't help.

I am getting a message of missing wpml-string-translation but everything seems to be installed and up to date as you can see in the images attached. Am I missing something? How can I get rid of that message?

In the error log this is the only new message that happened when installing the plugins you asked:

[04-Apr-2019 08:33:28 UTC] WordPress database error Table '.............._waiter' doesn't exist for query DELETE FROM _waiter WHERE wpid = 8830 /* From [................update.php?action=upload-plugin] in [..................inc/nine3-acf-fields.php:127] */ made by File_Upload_Upgrader->cleanup, wp_delete_attachment, do_action('delete_post'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, _nine3_acf_remove_reference

but the installation worked.

April 4, 2019 at 11:07 am #3534249

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

oh, that's because WPML needs to be updated as well. please update it as well.

April 4, 2019 at 11:25 am #3534325

alexP-13

Sorry I thought I did it already. I have updated it and cleared server and WPML cache but still not working

April 4, 2019 at 12:24 pm #3534681

Alejandro
Supporter

Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

It turns out the problem wasn't a problem at all! it was an expcted behaviour from a rule set on a plugin called "Simple 301 redirection" which you can check here: hidden link

if you try to search for the slug you are having issues with, you'll see it is set to redirect to news!

Change it or remove it to how you please but the redirect is coming from there.

Regards.

April 4, 2019 at 1:54 pm #3535549

alexP-13

I have deactivated Simple 301 Redirects and Simple 301 Redirects - Addon to check that but the problem is not that one.
In most of the pages the switcher is working fine but not in these subsections: /us/blog/ or /us/news/
The switcher there is visible but it doesn't change the slug, it stays with /us/blog/... and /us/news/... or /blog/... and /news/...
But it is not going from /us/blog/ to /blog/ or the other way around.

The topic ‘[Closed] Language switcher not changing the slug’ is closed to new replies.