bzndk Posted January 10, 2018 Posted January 10, 2018 Hi, Out ERP integration partner has run in to a nasty issue. When trying to do a simple API request ex. https://domain.com/api/combinations/2 The webservice / api fails and respond in a wird way xml <?xml version=“1.0” encoding=“UTF-8”?> <thirtybees xmlns:xlink=“http://www.w3.org/1999/xlink”> <errors> <error> <code> <![CDATA[0]]> </code> <message> <![CDATA[Wrong argument ($type) in Shop::getSharedShops() method]]> </message> </error> </errors> </thirtybees>
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 i am able to replicate this on a 100% clean TB install, trying to verify if the issue persist in the upcomming 1.0.4 ( it persists in 1.0.4 )
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 Created a github issue for this to https://github.com/thirtybees/thirtybees/issues/434 Hope we can get it sortet out, since it's one of the last pussle bricks before we are able to go in to the air with the new shop we build in TB :)
0 Baarssen Posted January 10, 2018 Posted January 10, 2018 The webservice also fails on my shops with my carrier(sendcloud) This is the reason i cant move with my mainwebshop, i use more webservices: Sendcloud, Channable, and i am afraid also the beslist, bol.com api will not work. I hope this will be solved. NB The webservices work fine on Prestashop 1.6.1.17
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 Baarssen - can you please share what API calls fail for you? then we get more information, and i think thats the key to fix the issue.
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 And what reply is returned for that API call, to figure out if there is a pattern.
0 yaniv14 Posted January 10, 2018 Posted January 10, 2018 I found 2 places that might cause this issue. I never experienced ws before so I am not sure. But it seems that classes/Combination.php should be modified on 2 lines: line 383: ->join(Shop::addSqlRestriction('attribute', 'a')) should be ->join(Shop::addSqlAssociation('attribute', 'a')) line 404: ->join(Shop::addSqlRestriction('product_attribute', 'a')) should be ->join(Shop::addSqlAssociation('product_attribute', 'a')) Can you please test and let me know if its ok.
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 im actually digging thrue thos parts right now to and i think it's about the same i have found so fare that might be the issue hehe, ill test it out in a bit just going thrue last parts to be sure i have not missed any thing.
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 Yep confirmed that is the issue, i get the response that i should now.
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 It's quite funny 10 min before your post i just send a note to Michael about i thought the issue could be in getWsProductOptionValues and then you posted after that, and yep true enough it was the issue, going to check out TB git and PS git to see if the mistake is made other places.
0 Baarssen Posted January 10, 2018 Posted January 10, 2018 For me this doesnt solve it, on the sendclouds side it gives a 500 error which doesnt tell us anything. I tried to manual execute some api calls which sendcloud is using and that gives some result what seems ok to me, however no parcels are imported into my sendcloud backoffice. For now i just keep it on PS 1.6.1.17 because that works fine since i started with sendcloud last year may or june.
0 bzndk Posted January 10, 2018 Author Posted January 10, 2018 Baarseen i am wondering if there system generates the 500 error insted of your server, since they might check for and not But what you need is to ask them to tell you what api call they do when it replys with a 500 error, with out that information it's impossible to look in to.
0 Baarssen Posted January 10, 2018 Posted January 10, 2018 @bzndk did some tests and modifications and its working now. It had something to do with It seems it only accepts prestashop. He will make a pull request about it
0 bzndk Posted January 11, 2018 Author Posted January 11, 2018 Im glad that we figured it out! Bith fixes, the initial issue and the issue with Sendcloud is added to the TB Git repo. Make sure to add both changes if you got issues with webservices. https://github.com/thirtybees/thirtybees/pull/436/files https://github.com/thirtybees/thirtybees/pull/437/files
Question
bzndk
Hi,
Out ERP integration partner has run in to a nasty issue.
When trying to do a simple API request ex. https://domain.com/api/combinations/2
The webservice / api fails and respond in a wird way
xml <?xml version=“1.0” encoding=“UTF-8”?> <thirtybees xmlns:xlink=“http://www.w3.org/1999/xlink”> <errors> <error> <code> <![CDATA[0]]> </code> <message> <![CDATA[Wrong argument ($type) in Shop::getSharedShops() method]]> </message> </error> </errors> </thirtybees>
14 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now