haive / google-api-adwords-php

Automatically exported from code.google.com/p/google-api-adwords-php
Apache License 2.0
0 stars 0 forks source link

Short description of the bug #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of the library are you using?
3.0.1

Which version of PHP are you using?
5.3.5

What steps will reproduce the problem?
Remove and create keyword in one action

What is the expected output? What do you see instead?
No errors.

Please provide any additional information below.
Full error:
Updated PHP API Library to 3.0.1(from old one which used v201008, can't find 
exact version).
Catched exception SoapFault exception: [soap:Client] Unmarshalling Error: 
cvc-elt.4.3: Type 'ns1:Criterion' is not validly derived from the type 
definition, 'CriterionUse', of element 'ns1:criterionUse'.  in 
/***/Google/Common/Lib/AdsSoapClient.php:201
http://pastebin.com/Qcx1bp6L

Original issue reported on code.google.com by gris...@gmail.com on 16 Mar 2012 at 7:44

GoogleCodeExporter commented 8 years ago
This error appears to be valid.  In the first operation you are passing the 
Criterion object in the field "criterionUse", instead of the correct field 
"criterion".

Original comment by ekoleda+devrel@googlers.com on 16 Mar 2012 at 9:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Sorry, found the issue. I've passed criterion as second argument, not third:
new AdGroupCriterion((float)$group_id, new Criterion((float)$keyword_id))
But it worked in old library version. I got this bug only when I have upgraded.

Many thanks and sorry for invalid ticket.

Original comment by gris...@gmail.com on 19 Mar 2012 at 11:35