Skip Navigation

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 32 replies, has 3 voices.

Last updated by Radu 2 hours, 18 minutes ago.

Assigned support staff: Radu.

Author Posts
November 12, 2021 at 9:32 am #9980787

henrid-2

Hi,

Thank you for looking into this.
We are talking about my website accessible on hidden link and DearReal.fr.

I have migrated my site from SiteGround to Aws LightSail with the CloudFront CDN. This meant moving to the Bitnami WordPress version.

This has had some impact on my WPML install.

The language switcher in my footer has stopped working, it links to the same language's homepage. It's layout has also changed a bit with a bullet point showing up in front of the country name.
The translated copyright notice in my footer translation has disappeared.
When I go to the Language URL format and hit save I get the message "not valid".

Many thanks for your help,
Henri

November 12, 2021 at 5:02 pm #9984357

henrid-2

Hi,

Just realised that the language switching was working English to French but not French to English.

I was having problems SFTPing to my bitnami install to update the CSS file in my child theme. I followed the following guide hidden link while updating the path to the latest bitnami WordPress path. This has solved my SFTP problem but I have since the error message:
WPML String Translation is attempting to write .mo files with translations to folder:
/opt/bitnami/wordpress/wp-content/languages/wpml
This folder appears to be not writable.
Please contact my hosting company.

My hosting company is aws and I cannot contact them...
I can write commands to give rights to this folder but I don't know what the user is called.

Many thanks for your help.
Henri

November 12, 2021 at 9:06 pm #9985119

henrid-2

writing the command "sudo chown -R daemon /bitnami/wordpress/" in my SSH has solved the warning wp-admin but not my language switcher French > English issue and copyright notice not being translatable.

I have translated the text in the "String translation" part of WPML

November 13, 2021 at 9:38 pm #9988775

henrid-2

Hi,

Though I would recap what my issues are.

1. I cannot get my language switcher work from DearReal.fr to DearReal.com when DearReal.com is my primary language.
The WPML settings mention that my DearReal.fr setting is not valid when I save it. This might be because the DearReal.fr DNS points to the CloudFront CDN address for DearReal.com instead of DearReal.com. I set it up this way to limit the number of redirections that are bad for SEO.

2. I cannot show the translated copyright notice in my footer while I have translated the sting using the WPML back office.

Many thanks for your help,
Henri

November 14, 2021 at 7:54 pm #9991989

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi Henri,

As we try to focus each ticket to 1 issue, I will start with #1.

There are some known issues with WPML + AWS lightsail that stem directly from their hosting environment. Unfortunately this is something that limits us as we are not able to control their hosting environment.

For example, if you were to migrate to a local environment or a different host these issues might be resolved.

------------
Regarding the domain and the language switcher:

1. Notice in the source of FR it self points.

What are your results if you go to WPML->languages and switch from a different domain to directories as the language URL Format?

Does the issue remain?

If it's resolved, please review the following documentation and make sure it's set up ok
https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

November 14, 2021 at 8:43 pm #9992103

henrid-2

While trying to find a solution to my URL problem (1); there are some reports that this could be caused by HomeURL and SiteURL missing from the wp_options.

Because I am using Cloudfront I have had to follow the guide here: hidden link

To work with Cloudfront I need to change the HomeURL and SiteURL WpConfig formula for the below:
define('WP_SITEURL', 'hidden link' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'hidden link' . $_SERVER['HTTP_HOST'] . '/');
if (isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'])
&& $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}

My issue awfawly looks similar to the following but the solution was not made public:
https://wpml.org/forums/topic/bitnami-on-aws-domain-per-language-language-swticher-on-dk-redirecting-always-to-dk/

I've also tried flipping the default language of my website from French to English and vice versa which has not worked.

I've also followed all the recommended steps at the bottom of this page: https://wpml.org/forums/topic/english-default-language-dont-load-theme-correctly-after-setup-cloudfront-cdn/ did not work.

I tried with directories and reverting back to domains. This worked with directories but had to use my back up as it would not revert back to domains.

I am ashamed by posting soo much on this thread! Thanks for your help!

Henri

November 14, 2021 at 11:45 pm #9992229

henrid-2

Bobby,

Really appreciate your patience thanks!

I have tested the option "Different languages in directories" and it works fine.

I have also looked at https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/.
I have deactivated the WPML plugin and landed on the English version of my website on both URLS.
Per AWS indication the URL to use with A alias redirect in my DNS for both URLS is XXjnnn8q4be2t.cloudfront.net (replace XX by dj, really don't want this URL to be indexed).

Best,
Henri

November 15, 2021 at 12:56 pm #9996717

henrid-2

@bobby,

I thought the answer to my problem lay here: https://wpml.org/forums/topic/language-url-format-a-different-domain-per-language-6/#post-5392685

I can't get the link in the last post, but I would love to visit it.

Implemented the steps in this video: hidden link
also described here hidden link

The redirection from French to English is still not functioning. 🙁
Keeping the hustle going.

November 17, 2021 at 11:27 am #10013751

henrid-2

Dear support team,

My learning curve has been very steep and you have been helping me a lot!
Hope I am not blacklisted for abusing your time.

I can't get the widget to work French -> English.
My separate domain setup won't validate in "Language URL format".

I want to fight but I don't know where to put my focus anymore.

Many thanks;
Henri

November 17, 2021 at 9:18 pm #10018253

Radu
Supporter

Languages: English (English )

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

Hey Henri,

We are definitely not gonna blacklist you. I mean, as long as you have a question about WPML, you are more than welcome to write us here.

Now, is there any chance that you could tell me if you managed to configure WPML, please? I can see that you added a couple of updates and, in your last message, you mention something about widgets. I just want to make sure that I am checking the right issue.

Thanks,
Radu

November 17, 2021 at 10:01 pm #10018373

henrid-2

Hey Radu,

Thanks for getting back to me! 😀

If you check my website hidden link and hidden link, I have a change language widget in the footer.

It does not work French -> English.
It does not "Validate" when I save "Language URL format" "A different domain per language" in my WPML.
It works fine when I switch to "Different languages in directories".

I use a widget to place it in my footer's theme and a [wpml_language_selector_widget].

It was working fine on SiteGround, but I have migrated to AWS Lightsail with a Bitnami WordPress instance, and it has stopped functioning. I have set things up on AWS Lightsail with their CDN CloudFront. It also makes sense for me to be with AWS as they are hosting the back office of my app and the web app part of my app. The performance on Google's speed insight has improved.

The Bitnami functioning with CloudFront has required me to change the wp-config.php for HomeURL and SiteURL formula for the below:
define('WP_SITEURL', 'hidden link' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'hidden link' . $_SERVER['HTTP_HOST'] . '/');
if (isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'])
&& $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
I've had some server rights issues having to flip rights using terminal commands to implement this, but I believe it is solved now.
The HomeURL and SiteURL fields both show hidden link.

CloudFront configuration requires you to point the DNS as an Alias to a cloud front address which I have done for both my URLs. XXjnnn8q4be2t.cloudfront.net (replace XX by dj, I don't want this URL to be indexed).

The Bitnami instance does not work with .htaccess, but I have made changes to my bitnami to make sure .htaccess is considered and tested it works.

I have deactivated plugins to see if there was a conflict.

I have deactivated WPML, and I land on the primary language each time.

I've hiked my Memory limit to 512M.

I don't know where to throw my energy to make this work your help is a Godsend!

best,
Henri

November 18, 2021 at 5:50 pm #10025589

henrid-2

Adding some details about my config to help you help me.

- screenshots of the DNS for both domain names.
- screenshot of my .htaccess

Screenshot 2021-11-18 at 17.45.02.png
Screenshot 2021-11-18 at 17.46.48.png
Screenshot 2021-11-18 at 17.48.18.png
November 21, 2021 at 9:38 pm #10039667

Radu
Supporter

Languages: English (English )

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

Hey Henri,

Can you tell me if you managed to sort this out in the meantime, please? I'm asking this because I used the language switcher from the bottom right side of the page and changed the language to French. Everything worked fine, the hidden link page opened.

Thanks,
Radu

November 21, 2021 at 9:52 pm #10039673

henrid-2

Hi Radu!

Thank you for the follow up.
Issue is not solved.
The issue is French to English.
English to French works fine.

Greatly appreciate your help.
Will post right away if I find a solution.

Best
Henri

November 23, 2021 at 12:18 pm #10051531

Radu
Supporter

Languages: English (English )

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

Hey Henri,

Is there any chance that you could give me access to the dashboard area so I can have a look at the settings and see if I can spot anything wrong?

I'm not familiar with Bitnami WordPress version and I couldn't find any more information about what's different compared to the original WordPress version. So I'm not sure whether this is the reason why the issues appeared or if the source of the issue is somewhere else. Can you tell me how did you make the migration from Siteground to AWS?
Also, is there any way to move to the original WordPress, not the Bitnami one, to see if the issue is still available?

Thanks,
Radu