migueesc123 / WooCommerceConnector

A Power BI Custom Connector for WooCommerce
MIT License
30 stars 12 forks source link

Connector not working properly anymore #14

Closed luizhalvarez closed 3 years ago

luizhalvarez commented 3 years ago

Hi,

I've been using the connector for almost 3 months and worked perfectly since the beggining. But, yesterday, all of a sudden, it has started fetching only 10 orders from WooCommerce. I suspected it was only making one call through the API and changed the parameter 'Orders_Per_Page' to 100 it started to fetch only 100 orders. So I think it is probably only making one call. How can I fix that? Since the lists are set up drom StartDate and EndDate it does not make any sense to me.

Woocommerce Version = 4.3.1 WordPress Version = 5.4.6 API version selected is v3

Thanks for your attention and support

migueesc123 commented 3 years ago

Hey! I’ve been using the connector lately and can’t repro this scenario.

Could it be a specific change at the server level ? Can you repro this in a different instance of Wordpress + WooCommerce ? Perhaps a clean local instance where you can test the connector.

luizhalvarez commented 3 years ago

Uhumm. my dev team said that havent done any changes at server level.

Trying to explore the problem, I tested the function of the connector, it fetches data limited to the only one call but respecting the parameters as you can check below:

image

So it can reach all the database but just returns a limited number of rows. Could it be something with Woocommerce or even Wordpress limiting the data through the connector? It does not make any sense to me.

migueesc123 commented 3 years ago

I haven’t been able to repro this in my test environment.

are you able to repro this in other environments different than the one you initially tried on? Perhaps on a clean install of Wordpress + WooCommerce?

gijsvanbeek commented 3 years ago

A few weeks back we've had the same problem. Couldn't find why it was only returning one call. Long story short our server manager changed one of our webservers from Apache to Litespeed. changing it back to Apache fixed the problem, still don't know why it's not working with Litespeed Everything was exactly the same, WordPress install, WooCommerce, plugins etc

migueesc123 commented 3 years ago

If you only get one result it means that somethings happening with the pagination logic that the connector has.

One way to check that is to see the header response from the API for that call to see what it looks like and if perhaps there’s a difference between the Apache nginx and the litespeed response headers. That would be my main suggestion, but I didn’t even know that this could even happen. Seems more like a server configuration type of thing and not really something that you can even manage from Wordpress or WooCommerce

uplask commented 2 years ago

I have the same problem it can't paginate. I think that in this part WooCommerce.GetData = (url as text) => let Orders = Web.Contents(url,[Query=[per_page=Orders_Per_Page]]), Data = Json.Document( Orders), Metadata = Value.Metadata( Orders) [Headers] [Link] my server don't response all headers other than charset , and also Link is missing.