Update CustomerExtensionSetting PHP error

19 views
Skip to first unread message

Ανδρέας Παπαδόπουλος

unread,
Jul 1, 2019, 7:07:03 AM7/1/19
to AdWords API and Google Ads API Forum
Hello GoogleAds, 

I have a weird problem, similar to this, where the following code

$sitelinkResourceNames = [
    // resource names of extension feed items containing sitelinks successfully fetched from the API
];
$sitelinks = [];
foreach ($sitelinkResourceNames as $sitelinkResourceName) {
    $sitelinks[] = new StringValue(['value' => $sitelinkResourceName]);
}

$resource_name = 'RESOURCE_NAME_OF_CUSTOMER_EXTENSION_SETTING';

$customerExtensionSetting = new CustomerExtensionSetting([
    'resource_name'        => $resource_name,
    'extension_feed_items' => $sitelinks,
]);

$customerExtensionSettingOperation = new CustomerExtensionSettingOperation();
$customerExtensionSettingOperation->setUpdate($customerExtensionSetting);
$customerExtensionSettingOperation->setUpdateMask(FieldMasks::allSetFieldsOf($customerExtensionSetting));
$extensionFeedItemOperations[]     = $customerExtensionSettingOperation;

will work on my local development server (PHP 7.3.1) but on my production server (PHP 7.2.19) will return the following error:

"extensionSettingError": "EXTENSION_SETTING_UPDATE_IS_A_NOOP".
"message": "The UPDATE operation does not specify any fields other than the resource name in the update mask.",

Investigating FieldMasks::allSetFieldsOf($customerExtensionSetting) shows me that while the test environment
returns 'resource_name' and 'extension_feed_items' as expected, the production environment creates
just the 'resource_name' field, ignoring my 'extension_feed_items' completely. I have tried re-setting my extension_feed_items it in a different line like so:

$customerExtensionSetting->setExtensionFeedItems($sitelinks);

but that did not work either. Again, it is all working as expected on my development VM, using the latest API library. 

Thanks in advance,

Andreas



Google Ads API Forum Advisor Prod

unread,
Jul 2, 2019, 2:35:55 AM7/2/19
to adwor...@googlegroups.com

Hi Andreas,

Thank you for reaching out to us.

Could you confirm if you are using AdWords API? If yes, so I can further investigate the issue, could you provide the complete SOAP request and response logs? If you are using Google Ads API, please provide the complete JSON request and response logs. You may refer to this guide (for AdWords API) or this guide (for Google Ads API) on how to enable logging in your library. You may use the Reply privately to author option.

Regards,
Hiroyuki
Google Ads API Team



ref:_00D1U1174p._5001UCaNOj:ref
Reply all
Reply to author
Forward
0 new messages