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

Last updated by Itamar 11 months, 3 weeks ago.

Assigned support staff: Itamar.

Author Posts
October 10, 2018 at 7:42 am

francescP-2

Hello,

We have two languages (spanish / catalan) configured. Catalan is the default language. When changing from one language to another in the home page, "%20wpml" literal is added to the URL.

So, if we are at the home page in catalan, by changing to spanish the URL is hidden link
If we are in spanish and we go to catalan, the URL is hidden link. In this case, in addition, the /ca should not appear, since it is configured so that the default language does not show any suffix.

We're using the last version of WPML plugins.

Many thanks in advance.

October 10, 2018 at 3:18 pm #2804951

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I can see the issue on your site.
When I check your site and go to WPML -> Languages I can see that you have enabled a custom Language Switcher. I suspect that something is wrong with the code of this custom Language Switcher switcher.
Can you please elaborate on this point?
In what method have you created this custom Language Switcher?
Can you, please share with me the code of your custom Language Switcher and where in your site's files have you placed it?

Thanks,
Itamar.

October 10, 2018 at 5:10 pm #2805283

francescP-2

Hello,

Thanks for your quick response.

The code we use to show the language selector is located on the footer.php page within the theme.

We use this code:

do_action ('icl_language_selector');

We have read that it is preferable to use this other:

do_action ('wpml_add_language_selector');

But the result has been the same.

Thanks a lot.

October 11, 2018 at 10:11 am #2807511

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for the extra details.

I'm downloading the copy of the file that you have shared with me, and I'll check this issue and keep you updated here.

Thank you for your patience,
Itamar.

October 11, 2018 at 7:57 pm #2809653

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I've checked the issue with your site on my local server and found out that it is a problem with the theme. The issue persists even if I deactivate all the other plugins. I've now escalated this issue to our second tier supporters, and they will check it and see if a fix for this is possible.

It is important for me to mention that your theme is not officially compatible with WPMl and it might be a compatibility issue.
Is it a custom theme that you developed?

In any case, I'll keep you updated here on any news from our second tiers.

Thanks,
Itamar.

October 15, 2018 at 7:47 am #2816445

francescP-2

Hi,

many thanks for your swift action.

It's a custom theme, but I can't see how can it make the plugin work like this. It's strange that the literal "wpml" is added, and I don't understand why "/ca" is added to the default language, when it is configured not to do it this way.

Please, let me know anything you find out.

Thanks,
Francesc.

October 15, 2018 at 9:00 pm #2818799

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Francesc.

I'm still waiting for our second tier supporter reply on this issue.
I'll keep you informed here for any news about it.

Thank you for your patience,
Itamar.

October 21, 2018 at 8:16 am #2835227

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Our second tier supporter has checked this issue. We are very sorry, but since you are using a custom theme, we are limited with the help that we can give you on this issue. Since we see that WPML's Language Switcher is working fine on your site with the default theme and also works fine with your theme on other pages, then we can only try and help if you point us to where the hook is failing. Otherwise debugging a custom theme is out of the scope of this forum. At this point, I would suggest you consider contacting one of our certified partners from this link: https://wpml.org/contractors/
Before doing so, please have a look also here:
https://wpml.org/documentation/about-wpml-contractors/what-type-of-work-you-can-expect-from-contractors/

With our contractors, you might get the custom assistance you need to get on with your project.

Best Regards,
Itamar.

October 29, 2018 at 7:26 am #2857004

francescP-2

Hello,

finally we have been able to solve the problem. Indeed, the problem was in the programming of the theme and had nothing to do with WPML.

Thank you for all your support.

Regards,
Francesc

October 30, 2018 at 10:33 am #2861274

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Great, I'm glad that it is solved now!

I'm marking this ticket as resolved now.

Good luck with your web projects 🙂
Itamar.