Tuesday, 24 November 2015

Invalid field name

Hi Bela,

I am happy AWQL.me is useful for you daily. Feel free to send us any feedback or feature request. 

I think you already use scheduled queries for your needs. If not, don't wait to try it.

Best,

Bastien (AWQL.me team)

Le lundi 23 novembre 2015 11:03:19 UTC+1, Béla Szabó a écrit :
Hi,

I tested this query on awql.me and it works there.
Something must be wrong with AdGroupAdService.
We use this tool daily to synch ads with our servers for automated ad management.

I appreciate all your help.

2015. november 20., péntek 16:22:45 UTC+1 időpontban Béla Szabó a következőt írta:
Thank you.

2015. november 20., péntek 15:59:28 UTC+1 időpontban Nadine Sundquist (AdWords API Team) a következőt írta:
Hi Bela,

That does look like an issue to me. I'm checking with the engineers who work on this component to figure out if there have been any recent changes in regards to AdType. I'll get back to you as soon as I hear back from them.

Regards,
Nadine, AdWords API Team

On Friday, November 20, 2015 at 5:22:34 AM UTC-5, Béla Szabó wrote:
Hi,

I looked into it yesterday also and couldn't find it there, but this code has been working since last year, and the error reference is the AdType field. This error came up only yesterday.

More code:
              // Get the service, which loads the required classes.
              $adGroupAdService = $user->GetService('AdGroupAdService', ADWORDS_VERSION);

              if($type == 'IMAGE_AD')
              {
                // Create AWQL query.
                  $query = 'SELECT Url,CreativeFinalUrls,CreativeFinalMobileUrls,Id, ImageCreativeName, Status, AdType WHERE Status IN [ENABLED, PAUSED] AND AdType IN [IMAGE_AD] ORDER BY Id ASC';
              }
              elseif ($type == 'TEXT_AD')
              {
                 $query = 'SELECT Headline,Url,CreativeFinalUrls,CreativeFinalMobileUrls, Id, Description1, Description2, Status, AdType WHERE Status IN [ENABLED, PAUSED] AND AdType IN [TEXT_AD] ORDER BY Id ASC';
              }
              // Create paging controls.
              $offset = 0;
              do {
            // Make the get request.
              $pageQuery = sprintf('%s LIMIT %d,%d', $query, $offset,AdWordsConstants::RECOMMENDED_PAGE_SIZE);
               // Make the query request.
            $page = $adGroupAdService->query($pageQuery);

It has been worked until yesterday.



2015. november 19., csütörtök 23:01:07 UTC+1 időpontban Nadine Sundquist (AdWords API Team) a következőt írta:
Hi Béla,

Under the AdGroupAdService, I looked at AdGroupAd, Ad, and some of the other sub-objects under Ad. I couldn't find AdType as a field name. The only field that is similar to that field name is Ad.Type, but that field is not selectable and not filterable. I know there's a feature request in to have a filterable AdType for Ad, but it does not exist today. 

Cheers,
Nadine, AdWords API Team

On Thursday, November 19, 2015 at 10:58:52 AM UTC-5, Béla Szabó wrote:
Hi!

Getting this error since today, which is strange because i can't see any change on the AWQL field names.

[SelectorError.INVALID_FIELD_NAME @ query; trigger:'AdType', SelectorError.INVALID_PREDICATE_FIELD_NAME @ query; trigger:'AdType']

The query is:

SELECT Url,CreativeFinalUrls,CreativeFinalMobileUrls,Id, ImageCreativeName, Status, AdType WHERE Status IN [ENABLED, PAUSED] AND AdType IN [IMAGE_AD] ORDER BY Id ASC

Using with AdGroupAdService.

Thanks for any help.
 

No comments:

Post a Comment