Invalid field name

133 views
Skip to first unread message

Béla Szabó

unread,
Nov 19, 2015, 10:58:52 AM11/19/15
to AdWords API Forum
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.

Nadine Sundquist (AdWords API Team)

unread,
Nov 19, 2015, 5:01:07 PM11/19/15
to AdWords API Forum
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

Béla Szabó

unread,
Nov 20, 2015, 5:22:34 AM11/20/15
to AdWords API Forum
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.

Nadine Sundquist (AdWords API Team)

unread,
Nov 20, 2015, 9:59:28 AM11/20/15
to AdWords API Forum
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

Béla Szabó

unread,
Nov 20, 2015, 10:22:45 AM11/20/15
to AdWords API Forum
Thank you.

Béla Szabó

unread,
Nov 23, 2015, 5:03:19 AM11/23/15
to AdWords API Forum
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.

Josh Radcliff (AdWords API Team)

unread,
Nov 23, 2015, 8:25:04 AM11/23/15
to AdWords API Forum
Hi Bela,

The change that caused this issue has been reverted, and your queries by AdType should work again now. Please let me know if you continue to see these errors.

Thanks,
Josh, AdWords API Team

Béla Szabó

unread,
Nov 23, 2015, 9:16:35 AM11/23/15
to AdWords API Forum
Hi Josh,

The problem is solved, i don't get any errors now.

Thanks

bastien rabaute

unread,
Nov 23, 2015, 11:57:55 AM11/23/15
to AdWords API Forum
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)
Reply all
Reply to author
Forward
0 new messages