If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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

Last updated by Diego Pereira 6 months, 3 weeks ago.

Assigned support staff: Diego Pereira.

Author Posts
March 9, 2019 at 12:56 pm #3298144

henkC

Hello, I know there are some posts regarding this topic but after trying every option in those topic, I still haven't found a solution so here I am.

First of all, the problem I'm having only appeared recently and I have no idea why.

So, English is my default language, dutch and french are the other languages. When you're on the English site and you click on a link referring to a product category, it goes to the product category as it should.

But when you switch to dutch or french and you do exactly the same, the link changes somehow, places the language parameter in the middle of the url and when clicked it redirects the page to the general category page. (this is normal because of the settings)

This issue only occurs when clicking on a link to go to a product category, the issue doesn't occur when linking a product or anything else.

I'll give an example (1):
clicking on the product category link on the English site:
hidden link

clicking on the product category link on the dutch site (2):
hidden link

which should be (3):
hidden link

Now, on top of all that, the last link (3) works when copy pasting it or when going to it using the menu, it only doesn't work when inserting it in the editor (see screenshots).

Any ideas what I'm doing wrong or a solution for this problem?

Thanks!

March 11, 2019 at 2:21 pm #3313635

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @henkc, welcome to the WPML support Forum!

Please try the following:
- Go to WPML -> Languages -> Language URL format -> Select 'Different languages in directories' option -> Save the changes.
- Go to Settings -> Permalinks -> Re-save the permalink structure.

If the issue persist, please try the following:
- Backup the website
- Temporarily Switch to a default theme (like twenty-seventeen)
- Disable all plugins and leave only WPML + Extensions active
- Go to Settings -> Permalinks -> Re-save the permalink structure.
- Check if the issue persist

Please let me know if it worked for you.

All the best,
Diego

March 30, 2019 at 10:46 am #3497987

henkC

Hi again

The first solution you gave me works but isn't valid in our case. We have lots of advertisements so when changing the URL structure, all of those links in the ads would be broken. The URL structure really can't change.

When trying your second option, I've noticed that when I disable Woocommerce, the links go back to normal. I've updated the Woocommerce category hierarchy and all things I know about but that didn't change anything. Disabling and enabling woocommerce didn't change anything either.

Any ideas on how to solve this?

Greetings

April 1, 2019 at 4:31 pm #3510105

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

I sent some instructions to replicate the website through a private message (previous answer).

Please let me know if it worked for you. If so, please send us clear instructions on how to see/reproduce the issue.

Kind regards,
Diego

April 5, 2019 at 1:13 am #3539191

henkC

Hi

So I've tried to migrate the website with the given values from you but it failed. As instructed by the email I got from Cloudways I contacted the support from Cloudways. After trying several things they told me that they weren't able to solve the issue because the was no 'Create table' method available.

They told me to contact you again and give you my db backup so you can manually add it into the Cloudways server so you can try and resolve my original issue.

Now, before I upload a backup of the our database I have to be sure that the transaction will be private so no one can download the db backup besides WPML support.

Thanks

April 5, 2019 at 5:56 pm #3546263

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

We need also the WordPress files. In this case, please send us a duplicator package, following the instructions here: https://wpml.org/faq/provide-supporters-copy-site/

Please use the private field to send us the link.

Kind regards,
Diego

April 8, 2019 at 5:44 pm #3560455

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thank you very much! I will use the staging version for now and download the package if further debug is needed.

I updated WPML and did a few tests but the issue persist. I will ivestigate further and send you a feedback soon.

Kind regards,
Diego

April 9, 2019 at 2:11 pm #3567735

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

The issue seems related to your theme (flatsome) and the UX Builder. If you go to Products > Categories on back-end, search for the "unit" category then click on "View", you will see that the correct link is generated for all languages.

It seems that you are using relative URL's in the slider, and for some reason the theme is not translating it correctly. A quick fix is to use absolute URL's instead of relative. I fixed it on the staging site using the steps below:
- Go to Products > Categories
- Search for the category (unit)
- Click on "View"
- Copy the entire URL of the category
- Go to pages > All pages and edit the homepage
- Search for "Naim Unit", edit the link then paste the URL
- Save
- Change the language to Dutch using the language swithcer at the top admin bar and repeat the process to update the dutch translation

After these steps, the links are working on the staging site: hidden link

Please let me know if it worked for you.

Kind regards,
Diego

April 13, 2019 at 10:06 am #3604187

henkC

Hi

I've done every step over and over but the absolute URL keeps changing to a relative URL every time I save and refresh. No idea how to solve this.

couple of things I tried:
- all of the given steps on the English version, next repeated the process on the dutch version with the dutch version of the URL
- tried changing in UX Builder, tried changing in code, tried changing in the raw code section.

I've attached some snapshots of before and after the changes, all screenshots are from the dutch version.
s1 -> before save and refresh
s2 -> after save and refresh
s3 -> before save and refresh
s4 -> after save and refresh

I've been comparing the staging site with the current one and I've noticed that there are several differences. Is it possible that the versions of Woocommerce and WPML of the staging site are different from the ones on the current site (I've already updated WPML on the current site and there doesn't seem to be a update available for either of them atm)?

If you'd like I can delete the current staging site and re-roll it to the current site version?

Thanks!

April 15, 2019 at 2:51 pm #3614151

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Please try with the following settings:
- Update WPML and other extensions to the lastest versions
- DIsbale WPML Sticky Links and WPML CMS Nav plugins

You can also try the manual update:
- Install this plugin (it will speed up the update process): https://wordpress.org/plugins/easy-theme-and-plugin-upgrades/
- Download the lastest versions from here: https://wpml.org/account/downloads/
- Upload the zip files to Plugins > All plugins

After that, please try the previous steps again and let me know if it worked.

Kind regards,
Diego

April 20, 2019 at 11:01 am #3650065

henkC

Hi

I've done everything you said and something did change but the issue still isn't resolved.
So I've updated everything to the latest version using their zip files. After that I redid every step from your previous reply.

The url in the editor stays absolute, meaning that this url isn't changing back to a relative one after saving and refreshing (s1 and s1.1).
Now the only remaining issue is that when looking at the url on the actual site, it is still the same as it was at the beginning (s2).

I've deleted the current staging site and will make a new one with the exact same details as the previous one in case you would like to check some things.

Thanks

April 22, 2019 at 6:35 pm #3657867

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

I think it's because of the "WPML Sticky Links". Have you disabled it?

If so, please send us access to your WordPress dashboard (website URL, login and password) I'll check and do some tests. - Please use the private field to send the sensitive data - do not post if you do not see it.

IMPORTANT Please backup a working copy of site files and database before.

Kind regards,
Diego

April 24, 2019 at 9:42 pm #3677209

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thank you. i will run some tests and send you a feedback soon.

Kind regards,
Diego

April 25, 2019 at 6:30 pm #3685031

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Please take a look at this video, you need to modify the link using the WordPress editor (not the page builder): hidden link

With these steps, the link was correctly translated: hidden link

I also fixed the issue of the other ticket.

Please let me know if it worked for you.

Kind regards,
Diego

April 27, 2019 at 10:54 am #3695221

henkC

Hi

The result is still faulty. I also made a video to show you what I do exactly.
hidden link

If you could set my next reply to private, I'll give you access to the actual website so you can try it yourself.

I've also tried doing the same thing on other pages and in other situations but it still gives me the same result.

Thanks

The topic ‘[Closed] Language parameter in middle of URL’ is closed to new replies.