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.

Tagged: 

This topic contains 13 replies, has 2 voices.

Last updated by Itamar 1 month, 3 weeks ago.

Assigned support staff: Itamar.

Author Posts
August 3, 2019 at 8:07 pm

Edouard

I am trying to:

Use the "Different languages in directories" option

Link to a page where the issue can be seen:

hidden link
=>
hidden link

I expected to see:

hidden link

Instead, I got:

hidden link

I already tried the following to no avail:

-- Clear the cache in WPML
-- Remove ghost entries from the translation tables
-- Fix element_type collation
-- Set language information
-- Fix post type assignment for translations

and this one too:
- Click on the Settings > Permalinks
- Click on the "Save changes" button;

I have multiple other websites using WPML and they are all working well. So I'm wondering...

August 5, 2019 at 10:05 am #4339637

Itamar
Supporter

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

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

Hi.

The URL structure that you are getting is very weird.
hidden link
Do things used to work correctly on this site with "Different languages in directories" and got broken? Or is not working from the beginning?
When I check your site indeed it seems that the is a problem with the "Different languages in directories" option. Please see the attached screenshot.
Please review our documentation at the following link and make sure that your server is configured correctly for this option and that you don't have an 'fr' folder in your WordPress installation.
https://wpml.org/documentation/getting-started-guide/language-setup/cannot-activate-language-directories/

Regards,
Itamar.

August 8, 2019 at 1:36 am #4358749

Edouard

Hi, I checked with my host (mediatemple) and they don't see any reason it shouldn't work. URL rewriting works. I also removed all plugins and switched to Twenty Nineteen and then activated for Different languages in directories. Still bugging.

Any help would be appreciated. Thanks

August 8, 2019 at 1:44 am #4358753

Edouard

And it just got weirder...

The slug of contact page shows this in the admin:

hidden link

While WPML returns this on the front (if I click on the translation link):

hidden link

August 8, 2019 at 3:41 pm #4364313

Itamar
Supporter

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

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

Hi and thanks for the extra details.

I've checked some things on your site. I also checked the .htaccess file because I thought something is wrong there. But I couldn't spot anything wrong. I still suspect that there are some wrong configurations on the server.

Please correct the following. Meanwhile, I set up for you a test server on our server where you will be able to migrate your site so we can continue to debug the issue.

By looking at the debug info that you have attached I can see that your server WP Memory Limit is set to 40M. Our recommendations are to have the following as minimal requirements:
- PHP 5.6 and above (this OK with your installation) with a WP Memory Limit of at least 128MB and more if possible.
- MySQL 5.6 and above (this OK with your installation).
Please follow this link for detailed documentation:
https://wpml.org/home/minimum-requirements/
Is it possible for you to change those to the minimum requirement?
You may need to contact your hosting provider for that.
Meeting those baseline requirements is most critical before starting to debug and sometimes solves issues like you experiencing.
Most important is to raise the WP Memory Limit.
Please try to raise it before you contact your hosting company.
You can try and do it from the wp-config.php file in your WordPress installation.
Insert this code in that file.

/** Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Add it before this line:
/* That's all, stop editing! Happy blogging. */

If the above does not solve the problem, then please continue to the troubleshooting section of our site.
1. Take a backup off your site.
2. Go to WPML -> Support -> Troubleshooting (link)
Please see attached screenshot support-troubleshooting
3. Once on the troubleshooting screen press the following buttons and check if it helps. Press each button at a time and wait for the process to complete.
- 'Clear the cache in WPML'
- 'Remove ghost entries from the translation tables.'
- 'Fix element_type collation'
- 'Fix WPML tables collation'
- 'Set language information'
- 'Assign translation status to duplicated content'
- 'Set language information'

*** Please make a backup of your database before using this.***

Could you please perform that procedure and see if it help?

Thanks,
Itamar.

August 10, 2019 at 11:04 pm #4375983

Edouard

Hi Itamar,

I did all the following after setting the Memory to 256M. Your plugin acknowledges that this value has changed.

Nothing changed.

Let me know how I can upload to your web server for testing purpose.

Thx

August 11, 2019 at 9:39 pm #4377601

Edouard

I don't know if it can help, but I notice that also, on the homepage, the plugin doesn't load any alternate URL. Not in the meta tags, not in the language menu

August 12, 2019 at 3:03 pm #4381797

Itamar
Supporter

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

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

Hi and thanks for trying my suggestions.

In the next private message, you will find all the details on how to migrate your site to our test server. When your site is on our server, I'll also be able to check the issue that you mention with the missing hreflang attributes.

Thanks,
Itamar.

August 12, 2019 at 3:05 pm
August 13, 2019 at 4:12 pm #4389427

Edouard

Hey, the migration has been done.

Thank you

August 14, 2019 at 8:27 pm #4397347

Itamar
Supporter

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

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

Hi and thanks for migrating your site to our server.

I'll be able to check the issue and reply here early next week.

Thank you for your patience.
Itamar.

August 14, 2019 at 8:31 pm #4397423

Itamar
Supporter

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

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

Changin status to assigned.

August 18, 2019 at 6:01 pm #4412595

Itamar
Supporter

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

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

Hi.

I've checked the copy of your site on our server, and the issue is not happening there.
If I try the same URLs that are not working on your site, they work perfectly on our test server. For example, hidden link is switching to hidden link when I switch to French.
Can you see that things are working correctly on our server when the "Different languages in directories" option is selected?

Please again make sure that things are configured correctly on your server according to our instructions here.
https://wpml.org/documentation/getting-started-guide/language-setup/cannot-activate-language-directories/

Regards,
Itamar.

August 24, 2019 at 1:31 pm #4451845

Edouard

Could you tell me which PHP version you are using on your test server? thank you

August 25, 2019 at 7:44 pm #4454987

Itamar
Supporter

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

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

Hi.

We are using PHP version 7.0.33 on our test server.

Regards,
Itamar.

The topic ‘[Closed] I get fr/fr/domaincom/fr/%pagename%/fr when trying to use "directory for langua’ is closed to new replies.