migueesc123 / WooCommerceConnector

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

The column "Column1" of the table wasn't found #6

Closed Alternatewords closed 5 years ago

Alternatewords commented 5 years ago

I am having an issue connecting to one of my company's WooCommerce sites. We have two sites, one B2C, one B2B. Both use the latest version of WordPress and WooCommerce (as of 11/20/18). I can connect fine to our B2C site at https://skandianvisk.com but I cannot connect to our B2B site, which is at https://orders.skandinavisk.com. I get an error stating "The column "Column1" of the table wasn't found". I am not sure what the issue could be. These are the differences between the two sites:

Both sites use a Let's Encrypt Authority X3 SSL cert.

Any assistance in tracking down the problem would be greatly appreciated.

migueesc123 commented 5 years ago

Hey! Would you mind using Fiddler to figure out what the response header looks like for the call that Power BI makes? that should give us an idea if the response that we receive is correct and perhaps something is wrong with my code.

You're only getting this error with "Orders" and not with the "Orders by Date" function?

Alternatewords commented 5 years ago

Figured it out. We're doing a 302 to the login page (it's a simplified login by currency for our wholesalers). If I remove the redirect the connection works fine. I am not the original developer though so either a) we can work around the redirect somehow or b) I need to look through the current configuration and somehow remove/replace the login procedure. I'd prefer a) though will evaluate options.

migueesc123 commented 5 years ago

Hey! this is actually pretty new to me. I'd love to know what you guys end up implementing. I'm a bit confused, since the calls that this custom connector makes are based on the url that you see on your [Path]/wp-admin/admin.php?page=wc-status

and those should work with the API. Are you able to make any API Calls any other way for that specific site?

Alternatewords commented 5 years ago

The problem here is that we're forcing a login since the site is not public. It's basically a simplified username/password page we're redirecting too. This seems to throw off things since there is a verification step involved.

I came up with a different solution for the time being, copying production to a staging site and connecting to that, disabling the redirect.

However, now I have a new issue, that is that only 10 rows are loading, basically the last 10 orders. I have no clue why that is. The query pulls a 1000 rows in preview just fine (about 1500 records total). I haven't restricted anything or changed any settings other than switching from PHP 5.6 to 7.1 on the server.

Alternatewords commented 5 years ago

Did another test with the production site and all records are loading after disabling the login redirect. So it's definitely something on the staging site even though all content is identical.

Also, I am wondering if issue #3 on this site is what we're running into: https://robotninja.com/blog/fix-common-woocommerce-rest-api-issues/

migueesc123 commented 5 years ago

Not gonna lie - that's pretty weird! I have 2 sites and they're both on WPEngine, and even when I do have some issues the support team usually resolves them quite quickly, but I've never faced the issues that you're handling. Either way, please do let me know if there's anything that I could help you with.