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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
Tagged: Exception
This topic contains 17 replies, has 0 voices.
Last updated by Andreas W. 11 hours, 9 minutes ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
January 31, 2025 at 5:52 pm #16656877 | |
ronaldT-5 |
Background of the issue: Symptoms: Questions: |
January 31, 2025 at 7:13 pm #16657064 | |
Mihai Apetrei Supporter
Languages: English (English ) Timezone: Europe/Bucharest (GMT+02:00) |
Hi there. That area is related to WordPress, and those separate URLs might come either from the site setup or from some data inside the database. Usually, we have the same exact link there, not separate ones. I recommend running a full website backup first and then trying to manually edit the other link so that you have only one link, like in the default language. I'm not sure why there are two separate URLs but I guess you own both of them, right? I mean, they are related somehow to you, just trying to make sure that your site was not hacked or something like this 🙂 Please let us know how things go. Mihai Apetrei |
January 31, 2025 at 7:37 pm #16657097 | |
ronaldT-5 |
>I'm not sure why there are two separate URLs but I guess you own both of them, right?< Is your question real? Tell me you have not been hacked. I have a bilingual site with separate domains, one in English (home-alarm.ca) and one in French (alarme-maison.ca). home-alarm.ca once translated becomes alarme-maison.ca. I don't suppose you speak French. Anyhow, I just changed the site URL for alarme-maison.ca. And when I go back to the WordPress settings for home-alarm.ca, the same French domain now appears as the site URL, therefore a mismatch. What is going on here? |
February 1, 2025 at 5:28 pm #16658688 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Go to WPML > Languages > Language Setup and verify which language is set as site default language. If you site default language is English, then please set Site URL and Home URL both to: home-alarm.ca If the site default language is French, then please set Site URL and Home URL both to: alarme-maison.ca Best regards |
February 1, 2025 at 7:21 pm #16658879 | |
ronaldT-5 |
Take a close look at the current settings (to which Yoast cannot handle): I have two domains, therefore two WordPress->General setups. |
February 1, 2025 at 7:40 pm #16658971 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
You only have one WordPress Setup and one language setting for the whole site. The second domain is only handled by WPML, not by WordPress. On alarme-maison.ca make sure that the site URL and home URL point to home-alarm.ca. Please follow my advice and let me know in case this will not solve the issue. |
February 1, 2025 at 8:00 pm #16659010 | |
ronaldT-5 |
If I do that, WPML asks me if I moved the site to a different domain. |
February 1, 2025 at 8:14 pm #16659062 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Please send me a screenshot of this dialog. |
February 1, 2025 at 8:19 pm #16659063 | |
ronaldT-5 |
Okay, I'm no longer getting that dialog box. Instead changing the WordPress URL to home-alarm.ca keeps alarme-maison.ca in place. |
February 1, 2025 at 8:28 pm #16659099 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Ok, maybe this might be expected if you are logged in to alarme-maison.ca. Ok, and how does this cause an issue with the Yoast License? Do you have issues running updates while being logged in to home-alarm.ca. |
February 1, 2025 at 8:52 pm #16659159 | |
ronaldT-5 |
Thanks for following up. See the attachment below. |
February 1, 2025 at 8:54 pm #16659179 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
This might be expected because alarme-maison.ca is not registered in your Yoast account. There is nothing we could to from our side about it. |
February 1, 2025 at 8:57 pm #16659222 | |
ronaldT-5 |
You do realize I have been talking to the Yoast support team all along about this. They blamed my WordPress->General URL's not matching. But, I have to admit, I only have one single license. I have to switch back between home-alarm.ca and alarme-maison.ca though. See the attachment below. |
February 1, 2025 at 9:25 pm #16659253 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Did you explain to Yoast that you are using WPML with different domains per language? SOLUTION: |
February 1, 2025 at 9:42 pm #16659307 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I took a look into the Yoast plugin and they have a dedicated filter hook that gets the site URL when WPML is used. You could try to add this snippet to the functions.php file of a Child Theme or a Code Snippet Plugin: public function filter_home_url_before() { \add_filter( 'wpml_get_home_url', [ $this, 'wpml_get_home_url' ], 10, 2 ); } public function wpml_get_home_url( $url, $language ) { // Get the current language using WPML filter $current_language = apply_filters( 'wpml_current_language', NULL ); // Check the current language code (this can be dynamic for different languages) switch ( $current_language ) { case 'en': // English return '<em><u>hidden link</u></em>'; case 'fr': // French return '<em><u>hidden link</u></em>'; // Add more cases for other languages as needed default: return $url; // Default to the original URL if no match } } |