Hello GoogleAds, 

I have a weird problem, similar to this 
<https://groups.google.com/forum/#!searchin/adwords-api/extension_feed_items%7Csort:date/adwords-api/5DcE3Tb8Sck>,
 
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



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0d7aebcd-e0a8-4264-9bc2-56fdb2b36625%40googlegroups.com.

Reply via email to