Martialdelastic / 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

GetAccountHierarchy.php example not giving proper output #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am using GetAccountHierarchy.php example of client library version 2.6.3,But 
getting only one client account as output hierarchy under both production as 
well as sandbox environment.
Can anyone suggest what i am doing wrong?

I think it should display main MCC account as root account and under
this MCC account all clients. Is i am thinking right way?

My output under sanbox environment is :
Login, CustomerId (Link Type, Status) client_5+emailid, 603****836

Also same way i am getting only one client for production environment. 

Thanks,

Original issue reported on code.google.com by chirag.e...@gmail.com on 21 Jul 2011 at 4:01

GoogleCodeExporter commented 8 years ago
Does the SOAP response contain more than one account in these cases?  I wasn't 
able to replicate the issue on my own account.

Original comment by ekoleda+devrel@googlers.com on 26 Jul 2011 at 5:12

GoogleCodeExporter commented 8 years ago
Yes, Soap response contain more than one account.
I have attached soap_xml Response here with.

Original comment by chirag.e...@gmail.com on 27 Jul 2011 at 7:15

Attachments:

GoogleCodeExporter commented 8 years ago
There is a known issue with the sandbox not returning the MCC account and 
returning the links with a manager ID of 0.  That is an issue with the API and 
not the client library.  In production however, this example should work 
correctly, since the MCC account will be returned there.

Original comment by ekoleda+devrel@googlers.com on 27 Jul 2011 at 1:47

GoogleCodeExporter commented 8 years ago
Hi Eric,

Thank you for your reply.

In production environment also i am getting only last account as output for 
GetAccountHierarchy.php example.

Output:
Login, CustomerId (Link Type, Status) email Id, 2269**1635 

I have attached SOAP XML for production environment.

Thanks,

Original comment by chirag.e...@gmail.com on 27 Jul 2011 at 2:37

Attachments:

GoogleCodeExporter commented 8 years ago
Can you also post the command line output when the example is run in the 
production environment?

Original comment by ekoleda+devrel@googlers.com on 27 Jul 2011 at 2:47

GoogleCodeExporter commented 8 years ago
Hi Eric,

Please look at command line output.

chirag@chirag-Aspire-5742:~$ php 
/adwords/examples/v201101/GetAccountHierarchy.php 

Login, CustomerId (Link Type, Status)
pun**i@gmail.com, 2269**1635

Thanks,

Original comment by chirag.e...@gmail.com on 27 Jul 2011 at 3:00

GoogleCodeExporter commented 8 years ago
Using your results I get the full structure printed out.  Which version of PHP 
are you using?

Original comment by ekoleda+devrel@googlers.com on 27 Jul 2011 at 4:00

GoogleCodeExporter commented 8 years ago
Hi Eirc,
I am using php version: PHP Version 5.3.3-1ubuntu9.5

Thanks,
chirag

Original comment by chirag.e...@gmail.com on 27 Jul 2011 at 5:15

GoogleCodeExporter commented 8 years ago
I'm also using PHP 5.3.3, although a custom build.  Can you send me a print_r() 
of the following variable at the end of the script: $graph, $rootAccount, 
$accounts, $childLinks, $parentLinks

Original comment by ekoleda+devrel@googlers.com on 27 Jul 2011 at 5:22

GoogleCodeExporter commented 8 years ago
Hi,
Please find the print_r for the variables you mentioned.

Thanks,
chirag

Original comment by chirag.e...@gmail.com on 28 Jul 2011 at 4:12

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the additional details.  Looks like the problem is that on 32-bit 
systems, the ID values are stored as doubles (aka floats).  Only integers and 
strings can be used as array keys in PHP, so the double values are being 
converted to integers and changing value.  Because these array keys are now 
wrong, the logic doesn't work.

I'm working on a fix that will prevent ID values from being cast as floats, and 
leaving them as strings instead.

Original comment by ekoleda+devrel@googlers.com on 28 Jul 2011 at 2:16

GoogleCodeExporter commented 8 years ago
Fixed in r197, which will try to detect ID fields and pass the values as 
strings instead of floats.

Original comment by ekoleda+devrel@googlers.com on 1 Aug 2011 at 2:55