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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Marcel 1 year, 2 months ago.

Assisted by: Marcel.

Author Posts
September 1, 2023 at 9:06 am #14325333

Ahliman maelT

Hi,

We have the same problem like here: https://wpml.org/forums/topic/your-site-cant-communicate-with-wpml-api-code-403/

Sometimes we have "Unable to parse data from service response." and sometimes "Invalid site key for the current site. Please note that the site key is case sensitive.".

Everything works on our localhost with exactly the same files, database, code etc.

We think that WPML blocked this domain pantheonsite.io because our sites are on *.pantheonsite.io

Can you please check if this domain is blacklisted or some sites with this domain?

We already contacted our hosting provider (Pantheon) and we got this message:

Your issue seems similar to what's discussed in this forum thread: https://wpml.org/forums/topic/your-site-cant-communicate-with-wpml-api-code-403/. The problem might be on the WPML side, and unfortunately, we have limited actions we can take from our end. It might be possible that WPML is the one who blocked access. Please try reaching out to WPML first since we don't block incoming traffic by default.

September 1, 2023 at 10:51 am #14326069

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

Usually, the domain/IP address gets blocked if they are sending too many requests (hundreds/seconds) to our API. However, from the Debug information, I can see that you're currently using an outdated version of WPML(including Addons) on your site. Please update the plugins to their latest version and check if the issue still persists.

If you're seeing the error even after updating the plugins to their latest version, please follow the instructions mentioned in the ticket below. I hope it will help.

- https://wpml.org/forums/topic/cannot-register-wpml-license-key-unable-to-parse-data-from-service-response/#post-14035759

Let me know if that helps or if you need further assistance in this matter. I will be happy to help.

Best Regards,
Prosenjit

September 1, 2023 at 11:36 am #14326275

Ahliman maelT

The same problem with the latest version, please see my message about our hosting provider, they have not any blacklisted IP adresse and they are saying it comes from WPML.

September 1, 2023 at 12:59 pm #14326669

Ahliman maelT

I found this code in "vendor/otgs/installer/src/Api/Endpoint/Subscription.php"

public function parseResponse( $response ) {
$body = wp_remote_retrieve_body( $response );
if ( ! $body || ! is_serialized( $body ) || ! ( $apiResponse = @unserialize( $body ) ) ) {
throw new InvalidResponseException();
}

if ( isset( $apiResponse->error ) ) {
throw new InvalidSubscription( $apiResponse->error );
}

if ( isset( $apiResponse->subscription_data )
&& isset( $apiResponse->site_key )) {
return $apiResponse;
}

throw new InvalidSubscriptionResponseException();
}

And when I debug $response I have this

<pre>array(6) {
["headers"]=>
object(WpOrg\Requests\Utility\CaseInsensitiveDictionary)#4089 (1) {
["data":protected]=>
array(4) {
["server"]=>
string(10) "awselb/2.0"
["date"]=>
string(29) "Fri, 01 Sep 2023 12:58:08 GMT"
["content-type"]=>
string(9) "text/html"
["content-length"]=>
string(3) "118"
}
}
["body"]=>
string(118) "<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>
"
["response"]=>
array(2) {
["code"]=>
int(403)
["message"]=>
string(9) "Forbidden"
}
["cookies"]=>
array(0) {
}
["filename"]=>
NULL
["http_response"]=>
object(WP_HTTP_Requests_Response)#4067 (5) {
["response":protected]=>
object(WpOrg\Requests\Response)#4088 (10) {
["body"]=>
string(118) "<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>
"
["raw"]=>
string(266) "HTTP/1.1 403 Forbidden
Server: awselb/2.0
Date: Fri, 01 Sep 2023 12:58:08 GMT
Content-Type: text/html
Content-Length: 118
Connection: close

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
</body>
</html>
"
["headers"]=>
object(WpOrg\Requests\Response\Headers)#4079 (1) {
["data":protected]=>
array(4) {
["server"]=>
array(1) {
[0]=>
string(10) "awselb/2.0"
}
["date"]=>
array(1) {
[0]=>
string(29) "Fri, 01 Sep 2023 12:58:08 GMT"
}
["content-type"]=>
array(1) {
[0]=>
string(9) "text/html"
}
["content-length"]=>
array(1) {
[0]=>
string(3) "118"
}
}
}
["status_code"]=>
int(403)
["protocol_version"]=>
float(1.1)
["success"]=>
bool(false)
["redirects"]=>
int(0)
["url"]=>
string(21) "hidden link"
["history"]=>
array(0) {
}
["cookies"]=>
object(WpOrg\Requests\Cookie\Jar)#4078 (1) {
["cookies":protected]=>
array(0) {
}
}
}
["filename":protected]=>
NULL
["data"]=>
NULL
["headers"]=>
NULL
["status"]=>
NULL
}
}
</pre>

September 2, 2023 at 8:13 am #14329793

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing more details about the issue.

Since the issue persists even after updating the plugin, a closer inspection will be required to understand the root cause. I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. If you can also share the steps to see the issue, that will also help a lot.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

IMPORTANT
-Please make a backup of site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

September 5, 2023 at 4:10 am #14339699

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for sharing the access information.

I thoroughly checked your site but was unable to locate the error. Often, such errors arise during site key registration; however, when I attempted this, everything proceeded without any errors. I checked in several ways to replicate the issue, but everything seems to be functioning well on your site.

I made a video during the investigation. Please check this video for a better understanding: hidden link

The issue you experienced might have been a temporary result of caching. It is recommended to check by clearing the site+server side caches. I also noticed a plugin on your site named "Pernod Ricard" which has several options to strengthen the overall security of the site. Please check if that plugin has an option to block the inbound or outbound API calls or requests.

Please let me know the update. I will be happy to help if you need further assistance in this matter.

Best Regards,
Prosenjit

September 8, 2023 at 7:18 am #14363915

Ahliman maelT

Hi,

I don't know why, but on the website that I gave you access it works, but not on other ones even If we clear the cache. About our custom plugins, we already tried to deactivate all of them and the problem is the same

September 8, 2023 at 5:00 pm #14367925

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

with the websites that are not working, do you mean the live sites or other staging/tests environments? Can you please provide a duplicator copy of a site where it's not working, so I can try the same on my localhost?

Thank You!

Best Regards
Marcel

The topic ‘[Closed] Unable to parse data from service response.’ is closed to new replies.