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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

Tagged: ,

This topic contains 39 replies, has 2 voices.

Last updated by Shekhar Bhandari 6 months, 1 week ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 27, 2023 at 1:50 pm #15132223

andrzejG-9

Guys what is going on?
We hitting 2 weeks of nothing has been done.

I have a whole team on hold plus my marketing goals are not being met.
This is certainly error on your end, so please do your job and fix this issues as soon as possible.

I was hoping for a resolution by xmas time and we are still stuck.

Please see attachments but the issue is that 3 languages are not being translated automatically due to the error.

Please work on it as soon as you can.
You mentioned that temporary server works well but when I asked for screeshots or access you said nothing - which is quite weird.

You guys are causing my organisation quote a cost so please do your job and resolve this.

Thanks
A.

Screenshot 2023-12-22 at 1.38.38 PM.png
Screenshot 2023-12-22 at 1.47.50 PM.png
December 27, 2023 at 2:46 pm #15132489

andrzejG-9

We've tried everything,
We went through all possible logs of webserver, wordpress php - all seems to be good.

This is an issue of your plugin talking to the your servers.
I demand escalating this issue to the top as soon as we can - we cannot work, we can not reverse - this is a huge huge issues for us.

Restored servers with old db and files also return the same issue (even though the codebase not the database haven't been touched at all). This is evidently your issue guys.

Can we please do something that we can start working? Anything so we can start working on the content - this is causing us a lot of pain, and costs us a fortune.

I chose WMPL because you guys supposed to help when there is an issue, so please do that!

We are bleeding here.
Please help!

December 27, 2023 at 3:56 pm #15132660

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am sorry for the inconvienence.

Due to Christmas and holidays, we have a limited number of supporters available and it's still in 2nd tier queue for now.

I didn't provide the screencast as I can replicate the issue on my local host too after some testing.

I will request an update quickly on the ticket and I will update you as soon as I will have further feedback.

Thanks

December 27, 2023 at 4:02 pm #15132710

andrzejG-9

Thank you for your answer!
We getting into the panic mode here.

Please keep me posted.

December 29, 2023 at 1:08 pm #15136746

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello,

Just to update you, we have identified the issue and in-order to fix this we will need our developers help, we have forwarded the issue to our developers and as soon as I will have further feedback about it, I will update you here.

Thanks

December 29, 2023 at 1:32 pm #15136787

andrzejG-9

Thank you for the update!

January 2, 2024 at 7:52 am #15140326

andrzejG-9

Good morning and all the best in new year!
Do we have any update on the issue?

Thanks
Andre

January 3, 2024 at 12:59 pm #15146638

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello,

Happy New Year 🙂

Our developer team is actively working on this issue and trying to find a solution for your site.

I will update you as soon as I will have any feedback.

Thanks

January 4, 2024 at 1:38 pm #15150772

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Our 2nd tier supporters suggested the following workaround:

- Edit the file wp-content\plugins\sitepress-multilingual-cms\classes\ATE\API\class-wpml-tm-ate-api.php Line number 357 replace

		public function get_languages_supported_by_automatic_translations( $languageCodes, $sourceLanguage = null ) {
			$sourceLanguage = $sourceLanguage ?: Languages::getDefaultCode();

			$result = $this->requestWithLog(
				$this->endpoints->getLanguagesCheckPairs(),
				[
					'method' => 'POST',
					'body'   => [
						[
							'source_language'  => $sourceLanguage,
							'target_languages' => $languageCodes,
						]
					]
				]
			);

			return Maybe::of( $result )
			            ->reject( 'is_wp_error' )
			            ->map( Obj::prop( 'results' ) )
			            ->map( Lst::find( Relation::propEq( 'source_language', strtolower($sourceLanguage) ) ) )
			            ->map( Obj::prop( 'target_languages' ) );
		}

with

		public function get_languages_supported_by_automatic_translations( $languageCodes, $sourceLanguage = null ) {
			$sourceLanguage = $sourceLanguage ?: Languages::getDefaultCode();

			$lang_case_mapping = [
				'de_at' => 'de_AT',
				'de_ch' => 'de_CH',
				'de_li' => 'de_LI'
			];
			$languageCodes = array_map(function($code) use ($lang_case_mapping){
				return isset($lang_case_mapping[$code]) ? $lang_case_mapping[$code] : $code; 
			}, $languageCodes);

			$result = $this->requestWithLog(
				$this->endpoints->getLanguagesCheckPairs(),
				[
					'method' => 'POST',
					'body'   => [
						[
							'source_language'  => $sourceLanguage,
							'target_languages' => $languageCodes,
						]
					]
				]
			);

			$revert_lang_code = function($obj) use ($lang_case_mapping) {
				$lang_case_mapping = array_flip($lang_case_mapping);
				foreach ($obj as $key => $value) {
					if (isset($lang_case_mapping[$key])) {
						$obj->{$lang_case_mapping[$key]} = $value;
						unset($obj->$key);
					}
				}

				return $obj;
			};

			return Maybe::of( $result )
			            ->reject( 'is_wp_error' )
			            ->map( Obj::prop( 'results' ) )
			            ->map( Lst::find( Relation::propEq( 'source_language', $sourceLanguage ) ) )
			            ->map( Obj::prop( 'target_languages' ) )
			            ->map( $revert_lang_code );
		}

I already made the changes to your site and it's working properly, so can you please check? I made it in the dev instance.

Look forward to your reply.

Thanks

January 4, 2024 at 2:45 pm #15151897

andrzejG-9

Thanks for the workaround. I truly appreciate it.
Will be waiting for permanent solution update.

Thank you.

January 5, 2024 at 6:01 am #15153224

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Sure, I am setting the status of the ticket to escalated to the developers team, will update you when the permanent fix will be released.

May 6, 2024 at 6:29 am #15595122

andrzejG-9

So when I will be able to update my code to remove this ugly workaround?

Thanks

May 6, 2024 at 9:11 am #15596152

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I will update you as soon as the fix is released, right not the issue is still in our developers queue.

Thanks