ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED in callout extension setting

89 views
Skip to first unread message

Sang Jin Kim

unread,
Mar 15, 2019, 5:25:55 PM3/15/19
to AdWords API and Google Ads API Forum
Hi !

I am migrating from v201806 to v201909.

But whenever I set callout extensions, I get ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED error reason like below.


Fatal error: Uncaught exception 'Google\AdsApi\AdWords\v201809\cm\ApiException' with message '[ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED @ operations[0].operand.extensionSetting.extensions[0], ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED @ operations[0].operand.extensionSetting.extensions[1], ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED @ operations[0].operand.extensionSetting.extensions[2], ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED @ operations[0].operand.extensionSetting.extensions[3]]' in /var/www/html/ad_manager/googleads-php-lib-v201809/src/Google/AdsApi/Common/Util/Reflection.php:43


API document says : CONCRETE_EXTENSION_TYPE_REQUIRED - Concrete sub type of ExtensionFeedItem is required for this operation

How can I set 'Concrete sub type of ExtensionFeedItem'?


Below is my PHP code.

Thanks in advance.


--------------------------------------------------------------------------------------------------------------

    $callouts = [];

    $callout1 = new CalloutFeedItem();
    $callout1->setCalloutText($callout_text_1);
    $callouts[] = $callout1;

    $callout2 = new CalloutFeedItem();
    $callout2->setCalloutText($callout_text_2);
    $callouts[] = $callout2;

    $callout3 = new CalloutFeedItem();
    $callout3->setCalloutText($callout_text_3);
    $callouts[] = $callout3;

    $callout4 = new CalloutFeedItem();
    $callout4->setCalloutText($callout_text_4);
    $callouts[] = $callout4;


    // Create your campaign extension settings. This associates the callouts to your campaign.
    $campaignExtensionSetting = new CampaignExtensionSetting();
    $campaignExtensionSetting->setCampaignId($campaignId);
    $campaignExtensionSetting->setExtensionType(FeedType::CALLOUT);
    $campaignExtensionSetting->setExtensionSetting(new ExtensionSetting());
    $campaignExtensionSetting->getExtensionSetting()->setExtensions($callouts);

    // Create a campaign extension setting operation and add it to the list.
    $operation = new CampaignExtensionSettingOperation();
    $operation->setOperator(Operator::ADD);
    $operation->setOperand($campaignExtensionSetting);
    $operations = [$operation];


    // Add the callouts on the server.
    $result = $campaignExtensionSettingService->mutate($operations);

------------------------------------------------------------------------------------------------------------------------

Sang Jin Kim

unread,
Mar 15, 2019, 5:29:44 PM3/15/19
to AdWords API and Google Ads API Forum

I'm sorry. 

I am migrating from v201806 to v201809.


2019년 3월 16일 토요일 오전 6시 25분 55초 UTC+9, Sang Jin Kim 님의 말:

googleadsapi...@google.com

unread,
Mar 18, 2019, 2:53:07 AM3/18/19
to AdWords API and Google Ads API Forum
Hi Kim,

Your code snippet seems correct. However, to further investigate this, could you provide the complete SOAP request and response logs instead when you encountered the ExtensionSettingError.CONCRETE_EXTENSION_TYPE_REQUIRED error? Please reply via Reply privately to author.

Thanks and regards,
Luis
AdWords API Team



--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/6aedc5b6-836e-4203-984e-bf15a105258a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sang Jin Kim

unread,
Mar 20, 2019, 7:12:43 AM3/20/19
to AdWords API and Google Ads API Forum

I found the reason.

In the process of updating to v201809, I didn't update one library like below.


use Google\AdsApi\AdWords\v201806\cm\CalloutFeedItem;


After correcting v201806 to v201809, it works fine.

I'm sorry for bothering you, Luis.





2019년 3월 18일 월요일 오후 3시 53분 7초 UTC+9, googleadsapi-forumadvisor 님의 말:
Reply all
Reply to author
Forward
0 new messages