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: Asia/Jerusalem (GMT+03:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Itamar 10 months, 4 weeks ago.

Assisted by: Itamar.

Author Posts
June 8, 2023 at 2:04 pm #13793667

robA-7

Tell us what you are trying to do?
Channable is trying to read out products from the website.

Information from Channable:
The problem is with the settings on their WordPress. What they likely need to do is explained in hidden link, but I'll describe the situation here as well.
The reason why the importer crashes is because X-WP-TotalPages is missing from the headers of the response when requesting the products. We crash because we need this header to determine the number of pages for which we need to make requests.
As for why it's missing, this is something that entirely depends on the server. After some googling, it seems that you need to enable CORS settings to expose headers, specifically Access-Control-Expose-Headers. When we make requests without specifying a language ( default in the settings), we do get this header, which is why the importer works. However, when I make requests specifying e.g. lang=de, the header is absent. This is as far as my knowledge extends: I've never worked with WordPress before, so it's most likely going to be up to them to figure out how to expose the X-WP-TotalPages header to us.

---

It does work when channable didn't add the ?lang=nl or ?lang=de to the url. But when they do that Access-Control-Expose-Headers is missing.

What is the link to your site?
hidden link (production website)

June 11, 2023 at 3:59 pm #13805561

Itamar
Supporter

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

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

Hi,

I'm unfamiliar with Channable.

I've Googled "Channable" and found this website.
hidden link

1. Is this service you are using?

2. Can you please explain to me what this service is and what it does?

3. Do they have a plugin for WordPress?

Your website is part of a WordPress multisite installation. WPML is compatible with WordPress multisite installations. Please ensure you have everything configured correctly. See our multisite guide here.

https://wpml.org/documentation/support/multisite-support/

Regards,
Itamar.

June 12, 2023 at 8:50 am #13807487

robA-7

Hi Itamar,

1. Yes that's the one we are using.

2. Channable is a feed management tool, which you create an import to extract products from WooCommerce for example: From Channable you can export it to different channels.

3.You can connect Channable via an API which you connect to the WooCommerce api with a consumer key & consumer secret. Then it extracts all the products from woocommerce. In this API it is possible to select a language that will determine which language products you get. And that's where we get the CORS error from.

About the Multisite:
Yes the install is indeed a multisite, but we don't really use it at the moment. The customers wanted to have a multisite for in the near future. The settings should be installed correctly.

June 12, 2023 at 9:24 am #13807969

Itamar
Supporter

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

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

Thanks for the information you provided.

I'm consulting our second-tier supporters regarding this issue. When I have their reply, I'll update you here.

Regards,
Itamar.

June 12, 2023 at 1:26 pm #13810069

Itamar
Supporter

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

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

Hi,

I have a reply from our second-tier supporter.

To the best of our second-tier supporter knowledge, WPML does not modify the headers.

Our second-tier supporter also says that some information is missing. Please explain the following.

1. Why is the user adding the language parameter for the API?
2. What is the API request? (what is its purpose).

Our second-tier supporter also wonders why you are using the language parameter in the request when your site is set to use the Language URL format of Different languages in directories. You may want to try the following. Change the Language URL format to the Language name added as a parameter. And check if now the request with a language parameter works with Channable.

Please let us know if you have further questions.

Regards,
Itamar.

The topic ‘[Closed] Channable not working with WC API when we use the ?lang parameter’ is closed to new replies.